It looks like url("file:...") still makes some conversion. I think we
should still use binfile to avoid conversion and before we do so, we
need to make sure we get the encoding right.
Mark Schonewille
Economy-x-Talk
https://ecxtalk.nl
https://www.nt2.nu
Programming LiveCode for the Real Beginner
http://www3.economy-x-talk.com/file.php?node=programming-livecode-for-the-real-beginner
Op 14-3-2020 om 14:29 schreef Paul Dupuis via use-livecode:
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
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode