AW: How to create a UTF-8 XML file with rev?
Tiemo Hollmann TB
toolbook at kestner.de
Fri Apr 17 05:35:15 EDT 2009
Moin Malte,
great help! I didn't knew, that I can create my own header...
Thanks
Tiemo
> -----Ursprüngliche Nachricht-----
> Von: use-revolution-bounces at lists.runrev.com [mailto:use-revolution-
> bounces at lists.runrev.com] Im Auftrag von Malte Brill
> Gesendet: Freitag, 17. April 2009 11:30
> An: use-revolution at lists.runrev.com
> Betreff: Re: How to create a UTF-8 XML file with rev?
>
> Moin Tiemo,
>
> this should get you started (mind linewraps):
>
> put encodeUtf8("<?xml version=" & quote & "1.0" & quote & "
> encoding=" & quote & "UTF-8" & quote & "?><request name=" & quote &
> pAction & quote & "></request>") into tData
> put revCreateXMLTree(tData, true, true, false) into tId
>
> function decodeUtf8 pContents
> local tContents
> put unidecode(uniencode(pContents,"UTF8"),"english") into tContents
> if chartonum(the last char of tContents)=10 then delete the last
> char of tContents
> return tContents
> end decodeUtf8
>
> function encodeUtf8 pContents
> return unidecode(uniencode(pContents, "english"), "UTF8")
> end encodeUtf8
>
> Make sure to encodeUTF8 when you put your data into the XML and to
> decode when you retrieve it.
>
> Hth,
>
> Malte
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list