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

Rolf-Werner Eilert eilert-sprachen at ...221...
Fri Dec 18 10:34:52 CET 2015


Am 18.12.2015 10:24, schrieb Tobias Boege:
> 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
>
"On the safe side" - that is what I wanted to know. Thank you! :)

Rolf





More information about the User mailing list