revXML and UTF-8
jbv at souslelogo.com
jbv at souslelogo.com
Sun Sep 17 11:04:59 EDT 2023
Thank you for your reply.
I found a workaround, but not a very elegant one :
when xml parsing returns some "????", I start the
parsing again, but I process the line as plain text
and not as xml.
It's about as fast.
Le 2023-09-17 09:32, Paul Dupuis via use-livecode a écrit :
> There are a number of "rev" libraries (revXML, revZIP, perhaps others)
> that are not fully Unicode compatible.
>
> See:
> https://quality.livecode.com/show_bug.cgi?id=18942 (revXML, revZIP)
> https://quality.livecode.com/show_bug.cgi?id=22202 (revZIP)
>
> ... and possibly others. There are no work-arounds for not being
> Unicode compatible (at least none I know of). In my opinion, bugs with
> no work-around should be among LC's higher priorities for bug fixes.
>
>
> On 9/17/2023 8:32 AM, jbv via use-livecode wrote:
>> Hi list,
>>
>> I have a text file encoded in UTF-8. Each line of the file
>> is an xml node with several sub-nodes and attributes.
>>
>> I have a loop in LC that reads lines one by one and creates
>> an xml tree with revXMLCreateTree. The goal is to parse each
>> line and extract some data.
>>
>> The problem is that, when for instance data is japanese or
>> chinese characters, the data always outputs as ????.
>>
>> When opening the file I use :
>> open file myFile for UTF8 read
>>
>> I tried to insert before each line :
>> <?xml version="1.0" encoding="UTF-8"?>
>>
>> and also :
>> put textEncode(myLine,"UTF8") into myLine
>>
>> Is there a way to declare an xml tree as UTF-8 ?
>>
>> Thank you in advance,
>> jbv
>>
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list