Re: revXML and UTF8

2023-04-10 Thread Brian Milby via use-livecode
Are you sending encoded data to libXML and then decoding the data you pull out?

In the first bug report in the thread, if you textDecode the output from libXML 
then it renders with the smart quote.

I recall this topic coming up before but I don’t mess with XML and can’t recall 
more details on it (could have been in the forum too).

Brian Milby
br...@milby7.com

> On Apr 10, 2023, at 4:09 AM, jbv via use-livecode 
>  wrote:
> 
> Hi list,
> 
> I have an xml file with lots of non-western characters
> (greek, arabic, japanese...). I need to convert these
> data into sql requests to insert into a DB.
> For each node, I need to pick only some attributes, so
> I wrote a script that :
> - opens the file as utf8
> - processes each node
> - writes a file as utf8 with the processed data.
> 
> My problem is that all non-western characters appear as
>  in the final file.
> Should I use unidecode for each revXMLNodeContents ?
> What am I missing ?
> 
> Thank you in advance.
> jbv
> 
> ___
> use-livecode mailing list
> use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revXML and UTF8

2023-04-10 Thread Paul Dupuis via use-livecode
And, as of LC9, there was a generic issue with revXML and Unicode. See 
https://quality.livecode.com/show_bug.cgi?id=18942


I have no idea if this was ever resolved. The bug has been "Hibernated"

On 4/10/2023 2:46 PM, jbv via use-livecode wrote:

Nope, when I process the data without using the xml library, all
characters display fine. The problem is really with revXML.
There must be a trick for using revXML with UTF8 file format.


Le 2023-04-10 07:28, Paul Dupuis via use-livecode a écrit :

Look up textEncode and textDecode in the dictionary. Text from or to a
file needs to be decoded or encoded since LC 7.


On 4/10/2023 4:07 AM, jbv via use-livecode wrote:

Hi list,

I have an xml file with lots of non-western characters
(greek, arabic, japanese...). I need to convert these
data into sql requests to insert into a DB.
For each node, I need to pick only some attributes, so
I wrote a script that :
- opens the file as utf8
- processes each node
- writes a file as utf8 with the processed data.

My problem is that all non-western characters appear as
 in the final file.
Should I use unidecode for each revXMLNodeContents ?
What am I missing ?

Thank you in advance.
jbv



___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revXML and UTF8

2023-04-10 Thread Paul Dupuis via use-livecode
This known bug is reading a UTF8 XML file, and I gather you are writing 
(or trying to write) a UTF8 XML file, but it may be related: 
https://quality.livecode.com/show_bug.cgi?id=21320



On 4/10/2023 2:46 PM, jbv via use-livecode wrote:

Nope, when I process the data without using the xml library, all
characters display fine. The problem is really with revXML.
There must be a trick for using revXML with UTF8 file format.


Le 2023-04-10 07:28, Paul Dupuis via use-livecode a écrit :

Look up textEncode and textDecode in the dictionary. Text from or to a
file needs to be decoded or encoded since LC 7.


On 4/10/2023 4:07 AM, jbv via use-livecode wrote:

Hi list,

I have an xml file with lots of non-western characters
(greek, arabic, japanese...). I need to convert these
data into sql requests to insert into a DB.
For each node, I need to pick only some attributes, so
I wrote a script that :
- opens the file as utf8
- processes each node
- writes a file as utf8 with the processed data.

My problem is that all non-western characters appear as
 in the final file.
Should I use unidecode for each revXMLNodeContents ?
What am I missing ?

Thank you in advance.
jbv



___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revXML and UTF8

2023-04-10 Thread jbv via use-livecode

Nope, when I process the data without using the xml library, all
characters display fine. The problem is really with revXML.
There must be a trick for using revXML with UTF8 file format.


Le 2023-04-10 07:28, Paul Dupuis via use-livecode a écrit :

Look up textEncode and textDecode in the dictionary. Text from or to a
file needs to be decoded or encoded since LC 7.


On 4/10/2023 4:07 AM, jbv via use-livecode wrote:

Hi list,

I have an xml file with lots of non-western characters
(greek, arabic, japanese...). I need to convert these
data into sql requests to insert into a DB.
For each node, I need to pick only some attributes, so
I wrote a script that :
- opens the file as utf8
- processes each node
- writes a file as utf8 with the processed data.

My problem is that all non-western characters appear as
 in the final file.
Should I use unidecode for each revXMLNodeContents ?
What am I missing ?

Thank you in advance.
jbv



___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: revXML and UTF8

2023-04-10 Thread Paul Dupuis via use-livecode
Look up textEncode and textDecode in the dictionary. Text from or to a 
file needs to be decoded or encoded since LC 7.



On 4/10/2023 4:07 AM, jbv via use-livecode wrote:

Hi list,

I have an xml file with lots of non-western characters
(greek, arabic, japanese...). I need to convert these
data into sql requests to insert into a DB.
For each node, I need to pick only some attributes, so
I wrote a script that :
- opens the file as utf8
- processes each node
- writes a file as utf8 with the processed data.

My problem is that all non-western characters appear as
 in the final file.
Should I use unidecode for each revXMLNodeContents ?
What am I missing ?

Thank you in advance.
jbv

___
use-livecode mailing list
use-livecode@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@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


revXML and UTF8

2023-04-10 Thread jbv via use-livecode

Hi list,

I have an xml file with lots of non-western characters
(greek, arabic, japanese...). I need to convert these
data into sql requests to insert into a DB.
For each node, I need to pick only some attributes, so
I wrote a script that :
- opens the file as utf8
- processes each node
- writes a file as utf8 with the processed data.

My problem is that all non-western characters appear as
 in the final file.
Should I use unidecode for each revXMLNodeContents ?
What am I missing ?

Thank you in advance.
jbv

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode