Hi Vinicius,
Tow things here...
1. Try to change the function module you use.
User NLS*FROM*SYS and NLS*TO*SYS function modules for converting the data from String to XSTRING and from XSTRING to STRING.
2. I believe you need to use a BIN format for the WD_RUNTIME_SERVICES to make sure you get all the data displayed properly. However based on the File Extension the data will be displayed in that Format only.