cancel
Showing results for 
Search instead for 
Did you mean: 

How can I change an encoding of XML document (+)

Former Member
0 Kudos

Hi.

The main idea:

>In ABAP, create XML document from external xml-file, parse it with iXML parser and use the data.

The problem:

>XML has windows-1251 encoding (its a cyrillic). (SAP code page 1504).

(get_value() ) I got the "### ###" symbols in my string variable. That is, all cyrillic symbols are replaced with '#' (other symbols are ok). The get_character_set() method of if_ixml_encoding for this document returns 'windows-1251'. In other words - all works just fine except all cyrillic symbols are replaced with '#'.

I've loaded xml file into internal table, translating the codepage, and when I'm looking at contents of that table I see my cyrillic symbols ok. After that, I'm creating input stream from that table and creating my XML document with create_istream_itable( ) method. And once again, when I'm trying to read values of nodes, I'm receiving the symols '#'.

How can I change that encoding? How can I get a value of the node in encoding different from the encoding of the xml document. (I need 1500 encoding instead of 1504). Method set_character_set( ) is no good - it creates an ABAP error.

Please, help.

Thank you for reading and for your time.

Kind regards,

Kissel Konstantin.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Perhaps you are taking advantage of CALL FUNCTION 'GUI_DOWNLOAD'.

If you do not put the codepage,

It should display the data in Windows-1251.

And if you put the encoding codepage '1503 'will be coded OEM 866.