Convert UTF-16 to UTF-8
Posted: Wed Mar 25, 2015 9:26 am
Hi,
I see a lot of examples for converting UTF-8 to UTF-16 but not the other way around. I am editing the XML in a MS Word document, which expects UTF-8. I have tried changing the encoding in the XML to use UTF-16 but it doesn't work (MS just seems to ignore that direction).
I have a word "Équipe" that I am putting into the Word XML. I have also created a basic document to see what Word does in encoding the word. The letter "É" is encoded (hex) as C3 89, whereas the UTF-16 value is (hex) C9. I checked other characters and it seems the accented characters are represented in Word as C3 and hex 40 less than the UTF-16 value.
Is there any code that converts the UTF-16 from Livecode into the UTF-8 I need for MS Word?
Thanks for any assistance
Cheers
Bergsy
I see a lot of examples for converting UTF-8 to UTF-16 but not the other way around. I am editing the XML in a MS Word document, which expects UTF-8. I have tried changing the encoding in the XML to use UTF-16 but it doesn't work (MS just seems to ignore that direction).
I have a word "Équipe" that I am putting into the Word XML. I have also created a basic document to see what Word does in encoding the word. The letter "É" is encoded (hex) as C3 89, whereas the UTF-16 value is (hex) C9. I checked other characters and it seems the accented characters are represented in Word as C3 and hex 40 less than the UTF-16 value.
Is there any code that converts the UTF-16 from Livecode into the UTF-8 I need for MS Word?
Thanks for any assistance
Cheers
Bergsy