Re: Use french special caracters in an XML file.
--- Damien Girard [EMAIL PROTECTED] wrote: Hi all, I make a database (in XML), in this database, user can write information about a lot of things, but I have tried my software, and I see a really nasty bug, and I didn't know how I can solve it. French special characters (éèçàù) doesn't work, I have got a strange return instead of the good characters. (For exemple, é - é$$) So, I think I need to encode the text, but how I can encode it ? Runrev provide a function that permit to encode text ? This database will treat a lot of data, so this need to be really fast. (Without any encoding, this is really fast.) Thanks. Damien GIRARD Hi Damien, Other than the earlier suggestions of htmlText and UTF-8, you can always change the encoding attribute at the start of your XML-file: ?xml version=1.0 encoding=ISO-8509-1? That's what we use at work to preserve special characters when exporting data from our PROGRESS databases. Hope this helped, Jan Schenkel. Quartam - Tools for Revolution http://www.quartam.com = As we grow older, we grow both wiser and more foolish at the same time. (La Rochefoucauld) Yahoo! Mail Stay connected, organized, and protected. Take the tour: http://tour.mail.yahoo.com/mailtour.html ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Use french special caracters in an XML file.
On May 20, 2005, at 10:38 AM, Damien Girard wrote: Hi all, I make a database (in XML), in this database, user can write information about a lot of things, but I have tried my software, and I see a really nasty bug, and I didn't know how I can solve it. French special characters () doesn't work, I have got a strange return instead of the good characters. (For exemple, - $$) So, I think I need to encode the text, but how I can encode it ? Runrev provide a function that permit to encode text ? This database will treat a lot of data, so this need to be really fast. (Without any encoding, this is really fast.) Thanks. Hi Damien, you can use some tricks. You can make a UTF-8 (unicode) enabled XML by setting it's encoding attribute to UTF-8, then pipe your unicode content to it. If you want this to display on Rev text fields then you need to set the unicodetext prop of the field, using put won't work. You can convert the diacreticals characters to their HTML entitities (by getting the htmltext prop of the field), escape the ampersand char and put the thing inside the XML, remember to convert back before setting the HTMLText prop of a field. You can create your own tagging routine (this is tedious, but it works). Cheers andre PS: did I helped? Damien GIRARD ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution -- Andre Alves Garzia 2004 Soap Dog Studios - BRAZIL http://studio.soapdog.org ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Use french special caracters in an XML file.
Thanks, I will try (setting the UTF-8). Girard Damien PS: If this work, you helped me. Le vendredi 20 mai 2005 à 10:47 -0300, Andre Garzia a écrit : On May 20, 2005, at 10:38 AM, Damien Girard wrote: Hi all, I make a database (in XML), in this database, user can write information about a lot of things, but I have tried my software, and I see a really nasty bug, and I didn't know how I can solve it. French special characters (éèçàù) doesn't work, I have got a strange return instead of the good characters. (For exemple, é - é$$) So, I think I need to encode the text, but how I can encode it ? Runrev provide a function that permit to encode text ? This database will treat a lot of data, so this need to be really fast. (Without any encoding, this is really fast.) Thanks. Hi Damien, you can use some tricks. You can make a UTF-8 (unicode) enabled XML by setting it's encoding attribute to UTF-8, then pipe your unicode content to it. If you want this to display on Rev text fields then you need to set the unicodetext prop of the field, using put won't work. You can convert the diacreticals characters to their HTML entitities (by getting the htmltext prop of the field), escape the ampersand char and put the thing inside the XML, remember to convert back before setting the HTMLText prop of a field. You can create your own tagging routine (this is tedious, but it works). Cheers andre PS: did I helped? Damien GIRARD ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Use french special caracters in an XML file.
On May 20, 2005, at 10:57 AM, Damien Girard wrote: Thanks, I will try (setting the UTF-8). Girard, If you're using revPutIntoXMLNode to put your contents, remember to uniDecode them. cheers andre Girard Damien PS: If this work, you helped me. -- Andre Alves Garzia 2004 Soap Dog Studios - BRAZIL http://studio.soapdog.org ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Use french special caracters in an XML file.
I didn't understands. I encode characters with UniEncode, and I put them after in the XML database. Put in return, When I get what I have wrote in the database, I have got only the first char. For exemple, this text : toto, I have got only this written in the XML file t I think I have forget something. Andre Garzia a crit : On May 20, 2005, at 10:57 AM, Damien Girard wrote: Thanks, I will try (setting the UTF-8). Girard, If you're using revPutIntoXMLNode to put your contents, remember to uniDecode them. cheers andre Girard Damien PS: If this work, you helped me. ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution
Re: Use french special caracters in an XML file.
On May 20, 2005, at 11:49 AM, Damien Girard wrote: I didn't understands. I encode characters with UniEncode, and I put them after in the XML database. Put in return, When I get what I have wrote in the database, I have got only the first char. For exemple, this text : toto, I have got only this written in the XML file t I think I have forget something. The docs says that you should uniDecode your variable content before entering it into a XML Node... I think you might be happier by using the htmltext property... this will free you from unicode hell. This would work fine even if you pipe the contents of the xml database to a browser. cheers andre -- Andre Alves Garzia 2004 Soap Dog Studios - BRAZIL http://studio.soapdog.org ___ use-revolution mailing list use-revolution@lists.runrev.com http://lists.runrev.com/mailman/listinfo/use-revolution