Page 1 of 1

weird problem with characters in XML

Posted: Wed Jul 09, 2014 4:53 pm
by Johan_VH
My data is read in from an xml-file. I use 3 languages (dutch, german and french) and hence have characters like ä and ç.

The XML has UTF-8 encoding in the header. If I save the xml as UTF-8, the characters get mangled by LiveCode, but open up fine in my XML editor.
If I use notepad and save the XML with ANSI encoding, the characters are ok in LiveCode, but my XML editor won't let me edit it.

So it's not so much of a huge problem, but I still think this is weird, and I am probably doing something wrong?

Johan

Re: weird problem with characters in XML

Posted: Thu Jul 17, 2014 2:58 pm
by Mark
Hi Johan,

Did you solve this already? There shouldn't be any issues with this, but I'm not sure what you're doing exactly. Do you read the XML file with the external or directly? You may need to convert the data before displaying it, but there are also some encodings for use in XML, which you'll need to parse before displaying the data.

If you're retrieving text, you could try

Code: Select all

set the unicodeText of fld 1 to uniEncode(myXMLData,"UTF8")
It might be easier for both of us to discuss this in the Dutch forum.

Kind regards,

Mark