Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A



I use:

li_file = FileOpen (ls_path + ls_file, LineMode!, Write!, LockReadWrite!, Replace!)

When i write:

ls_xml = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><name>QUÍMICO'

if FileWrite (li_file, ls_xml) = -1 then

  MessageBox("Error", "error", StopSign!)

end if

The result is: <?xml version="1.0" encoding="UTF-8" standalone="yes"?><name>QU΍ICO

But if i write:

ls_xml = "<?xml version='1.0' encoding='UTF-8' standalone='yes'?><name>QUÍMICO"

The result is: <?xml version='1.0' encoding='UTF-8' standalone='yes'?><name>QUÍMICO


Former Member
Former Member replied

Hi Victor;

  FWIW: Have you tried the FileWiteEX ( ) method instead?   I have not encountered your Unicode issue but .... I have not used the old FileWrite ( ) method in over a decade.

BTW: Since PB 10 (being Unicode) I only use  EncodingUTF16LE! within my PB applications and EncodingUTF8! when sending data to external applications. Note that WindowsVista and higher is all UTF-16LE.

Regards ... Chris

0 View this answer in context

Helpful Answer

Not what you were looking for? View more on this topic or Ask a question