Use french special caracters in an XML file.

Andre Garzia soapdog at mac.com
Fri May 20 09:47:22 EDT 2005


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 at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
>
>
-- 
Andre Alves Garzia ð 2004
Soap Dog Studios - BRAZIL
http://studio.soapdog.org



More information about the use-livecode mailing list