Kaydet (Commit) 15e7f34a authored tarafından Eike Rathke's avatar Eike Rathke

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.
üst 4af24fb1
# 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);
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment