XML Headaches

David Bovill david at openpartnership.net
Mon Jul 9 08:39:32 EDT 2007


On 09/07/07, Malte Brill <revolution at derbrill.de> wrote:

the text is UTF-8 encoded. It appears to be a BOM issue.


BOM might be an acronym or abbreviation for: #Bergen Ocean
Model#Bid-O-Matic#Bill of Materials#Board of Medicine#Book of Mormon#Bureau
of Meteorology, Australia#Byte Order Mark#Body of Minds (band)#Chhatrapati
Shivaji International Airport (IATA Airport Code: BOM), in Mumbai (formerly
Bombay), India

I received
> the following tip that appears to do the job:
>
> Instead of unidecode(uniencode(myXML,"UTF8"),"ANSII") for the whole
> XML data I have the following script now:
>
> -- Remove byte order mark from UTF8 text
>    if charToNum(char 1 of tVar) is 239 then
>      if charToNum(char 2 of tVar) is 187 then
>        if charToNum(char 3 of tVar) is 191 then
>          delete char 1 to 3 of tVar
>        end if
>      end if
>    end if
>
>    put revCreateXMLTree(myXML, false, true, false) into tTree


What is this doing / why exactly - any idea?

And what happens if you use:

é
>
> instead of  an accented e (é) ?



More information about the use-livecode mailing list