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
weird problem with characters in XML
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: weird problem with characters in XML
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
It might be easier for both of us to discuss this in the Dutch forum.
Kind regards,
Mark
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")
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode