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 | |
parent | Remove unused local var (diff) | |
download | core-15e7f34a2134b1a4d892f4e4d945b9cb547202ac.tar.gz core-15e7f34a2134b1a4d892f4e4d945b9cb547202ac.zip |
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')
-rw-r--r-- | liblangtag/liblangtag-0.2-reg2xml-encoding-problem.patch | 18 | ||||
-rw-r--r-- | liblangtag/makefile.mk | 1 |
2 files changed, 19 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); diff --git a/liblangtag/makefile.mk b/liblangtag/makefile.mk index 6acd16067f32..f318f8e8166f 100644 --- a/liblangtag/makefile.mk +++ b/liblangtag/makefile.mk @@ -41,6 +41,7 @@ PATCH_FILES+=liblangtag-0.2-0002-Fix-invalid-memory-access.patch PATCH_FILES+=liblangtag-0.2-configure.patch PATCH_FILES+=liblangtag-0.2-datadir.patch PATCH_FILES+=liblangtag-0.2-msvc-warning.patch +PATCH_FILES+=liblangtag-0.2-reg2xml-encoding-problem.patch CONFIGURE_DIR=. BUILD_DIR=$(CONFIGURE_DIR) |