diff options
author | Eike Rathke <erack@redhat.com> | 2012-08-11 12:50:11 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-08-11 13:41:26 +0200 |
commit | 15e7f34a2134b1a4d892f4e4d945b9cb547202ac (patch) | |
tree | 7800f0d57775ec050961b62b10a046b7613d39d7 /liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch | |
parent | 4af24fb1a3dd359be4b97f7682678aa5b8d2ff1a (diff) |
langtag: worked around reg2xml libxml2 encoding problem
libxml2 has a problem when a document encoding is specified, even though
documentation says that all internal representation would be in UTF-8 and
language-subtag-registry data already is passed in UTF-8, when specifying the
document encoding to be UTF-8 the output to language-subtag-registry.xml is
conversion garbage, '?' on Linux UTF-8 locale, ISO-8859-1 on Windows. If no
document encoding is specified at all no conversion happens and non-ASCII
values are correctly written as entities.
Diffstat (limited to 'liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch')
-rw-r--r-- | liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch b/liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch new file mode 100644 index 000000000000..cae5df5b9917 --- /dev/null +++ b/liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch @@ -0,0 +1,18 @@ +# libxml2 has a problem when a document encoding is specified, even though +# documentation says that all internal representation would be in UTF-8 and +# language-subtag-registry data already is passed in UTF-8, when specifying the +# document encoding to be UTF-8 the output to language-subtag-registry.xml is +# conversion garbage, '?' on Linux UTF-8 locale, ISO-8859-1 on Windows. If no +# document encoding is specified at all no conversion happens and non-ASCII +# values are correctly written as entities. + +--- misc/liblangtag-0.2/data/reg2xml.c 2012-01-30 13:20:57.000000000 +0100 ++++ misc/build/liblangtag-0.2/data/reg2xml.c 2012-08-11 02:30:39.147779753 +0200 +@@ -144,7 +144,6 @@ + gboolean retval; + + doc = xmlNewDoc((const xmlChar *)"1.0"); +- doc->encoding = xmlStrdup((const xmlChar *)"UTF-8"); + root = xmlNewDocNode(doc, NULL, + (const xmlChar *)"registry", + NULL); |