[Libreoffice] [PATCH] Escaped non-ASCII characters from source files.
Takashi Nakamoto
bluedwarf at bpost.plala.or.jp
Mon Aug 29 08:27:47 PDT 2011
Hello all,
The attached patch solves a compilation error in libxml2 which occurs on
Windows with some Asian locales. I would appreciate if someone pushes this.
Best regards,
Takashi Nakamoto
-------------- next part --------------
From c629ba7abc1316b1d66a4eefa0407523f62f0613 Mon Sep 17 00:00:00 2001
From: Takashi Nakamoto <bluedwarf at bpost.plala.or.jp>
Date: Mon, 29 Aug 2011 03:59:36 +0900
Subject: [PATCH] Escaped non-ASCII characters from source files.
Building libxml2 with VC++ 2008 Express Edition on Windows platform where
the locale is Japanese (or maybe Korean, Chinese or others) fails because
some files generated by test tools in libxml2 contains non-ASCII characters.
This issue is originally reported in OpenOffice.org community (issue 93433)
and a patch is provided by tora, but it has not been applied yet. This
modification is based on the patch and adapted to the current LibreOffice
source.
---
libxml2/libxml2-latin.patch | 32 ++++++++++++++++++++++++++++++++
libxml2/makefile.mk | 3 ++-
2 files changed, 34 insertions(+), 1 deletions(-)
create mode 100755 libxml2/libxml2-latin.patch
mode change 100644 => 100755 libxml2/makefile.mk
diff --git a/libxml2/libxml2-latin.patch b/libxml2/libxml2-latin.patch
new file mode 100755
index 0000000..d174413
--- /dev/null
+++ b/libxml2/libxml2-latin.patch
@@ -0,0 +1,32 @@
+--- misc/libxml2-2.7.6//runtest.c 2011-08-29 02:41:07.876872800 +0900
++++ misc/build/libxml2-2.7.6/runtest.c 2011-08-29 02:47:09.068970800 +0900
+@@ -2728,7 +2728,7 @@
+ "file:///path/to/a%20b.html",
+ "/path/to/a b.html",
+ "/path/to/a%20b.html",
+- "urip://example.com/r?sum?.html",
++ "urip://example.com/r" "\xe9" "sum" "\xe9" ".html",
+ "urip://example.com/test?a=1&b=2%263&c=4#foo",
+ NULL
+ };
+--- misc/libxml2-2.7.6//testapi.c 2011-08-29 02:41:28.088620300 +0900
++++ misc/build/libxml2-2.7.6/testapi.c 2011-08-29 02:46:32.966174100 +0900
+@@ -291,7 +291,7 @@
+ static xmlChar gen_xmlChar(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return('a');
+ if (no == 1) return(' ');
+- if (no == 2) return((xmlChar) '?');
++ if (no == 2) return((xmlChar) '\xf8');
+ return(0);
+ }
+
+@@ -399,7 +399,7 @@
+ static xmlChar *gen_const_xmlChar_ptr(int no, int nr ATTRIBUTE_UNUSED) {
+ if (no == 0) return((xmlChar *) "foo");
+ if (no == 1) return((xmlChar *) "<foo/>");
+- if (no == 2) return((xmlChar *) "n?ne");
++ if (no == 2) return((xmlChar *) "n" "\xf8" "ne");
+ if (no == 3) return((xmlChar *) " 2ab ");
+ return(NULL);
+ }
+
diff --git a/libxml2/makefile.mk b/libxml2/makefile.mk
old mode 100644
new mode 100755
index 8494d16..83180ed
--- a/libxml2/makefile.mk
+++ b/libxml2/makefile.mk
@@ -53,7 +53,8 @@ PATCH_FILES=libxml2-configure.patch \
libxml2-xpath.patch \
libxml2-global-symbols.patch \
libxml2-aix.patch \
- libxml2-vc10.patch
+ libxml2-vc10.patch \
+ libxml2-latin.patch
.IF "$(OS)" == "WNT"
PATCH_FILES+= libxml2-long-path.patch
--
1.7.5.1
More information about the LibreOffice
mailing list