[Gambas-user] XML string = UTF-8?

Tobias Boege taboege at ...626...
Fri Dec 18 10:24:28 CET 2015


On Fri, 18 Dec 2015, Rolf-Werner Eilert wrote:
> Is an XML file like the ones which are produced by File.Save and
> RichTextArea a UTF-8 file?
> 
> Do I have to handle the string with the String class, or is it plain
> ASCII and has to be handled with ordinary Mid, Left, InStr?
> 

It is possible that a random XML file contains UTF-8 characters: try opening
LibreOffice, typing some umlauts and saving the file. Use unzip on the .odt
to get the content.xml file. Then

  $ file -i content.xml

shows that it is UTF-8 encoded XML. So you are on the safe side with the
String class.

Regards,
Tobi

-- 
"There's an old saying: Don't change anything... ever!" -- Mr. Monk




More information about the User mailing list