Re: Where is André ? André says "goodbye"
Paul Dupuis
paul at researchware.com
Sat Mar 14 09:29:23 EDT 2020
On 3/14/2020 3:58 AM, Matthias Rebbe via use-livecode wrote:
> revXMLPutIntoNode idID, "/identity/name", textEncode (field "name_source" ,"UTF8") -- fld contains "André"
>
> When I write the XML file:
>
> put revXMLText (idID) into URL **myFile.xml**
>
> … I don’t find André any longer, but André
First, é is HTML for é which is correct, just encoded as an HTML
character value.
If you code it as (below) with the textEncode to UTF8 removed
on mouseUp
put
revXMLCreateTree("<identity><name></name></identity>",false,true,false)
into idID
revXMLPutIntoNode idID, "/identity/name", field "name_source" --
fld contains "André"
put revXMLText (idID) into URL
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")
end mouseUp
You just get Andr - the é is removed
on mouseUp
put
revXMLCreateTree("<identity><name></name></identity>",false,true,false)
into idID
revXMLPutIntoNode idID, "/identity/name", field "name_source" --
fld contains "André"
put textEncode(revXMLText (idID),"UTF-8") into URL
("file:"&specialFolderPath("desktop")&slash&"myFile.xml")
end mouseUp
You still just get Andr - the é is removed
I think revXMLText may convert all non-ASCII characters to HTML entities
Some of the rev* libraries are not fully Unicode aware, for example, for
revZIP, I filed this confirmed bug:
https://quality.livecode.com/show_bug.cgi?id=22202
Either by design or as a bug, any accented characters (non-ASCII) you
may have to deal with HTTML encodings for
And a search of the LiveCode Quality Center shows the exact bug you are
running into is: https://quality.livecode.com/show_bug.cgi?id=18927
More information about the use-livecode
mailing list