Hi all, i want to write with C$XML the following string to an xml: "1.223,36 €". The problem comes obviously with the euro symbol.
I initialize the parser setting encoding to "UTF-8"
call "C$XML" using CXML-SET-ENCODING export-parser "UTF-8".
I observed that on the runtime side the euro symbol is correctly encoded with the ascii code 128 (i saw it using function ord(), 129 - 1). When i create the xml and open it with notepad in utf-8 encoding i see no symbol where the € should be. Looking at it with an hexadecimal editor i see that there are 2 bytes allocated where the € should be and their content is c2 80 or, in decimal, 194 128. I found on wikipedia that the encoding of € in unicode is 3 bytes E2 82 AC.
I also tried to set the "us-ascii" encoding with CXML-SET-ENCODING but it doesn't work; with this encoding i would expect an header like <?xml version="1.0" encoding="us-ascii" standalone="no"?> while what i obtain is <?xml version="1.0" standalone="no"?> an the actual encoding is still the same as when i set "utf-8".
Can you give me some information on how the encoding works?
I verified this with runtime 9.0.1 and 9.1.1
Thank you,
Luca
#encoding
#cxml
#unicode
