r1664 - in glibc-package/trunk/debian: . patches patches/all
Author: barbier
Date: 2006-06-23 23:11:23 +0000 (Fri, 23 Jun 2006)
New Revision: 1664
Added:
glibc-package/trunk/debian/patches/all/cvs-iso2022jp-roundtrip.diff
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/series
Log:
* Add all/cvs-iso2022jp-roundtrip.diff, backported from CVS.
Fix roundtrip conversion for 0x5C character. (Closes: #375074)
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2006-06-21 01:02:53 UTC (rev 1663)
+++ glibc-package/trunk/debian/changelog 2006-06-23 23:11:23 UTC (rev 1664)
@@ -21,6 +21,8 @@
still a higher precedence over /etc/environment. (Closes: #363644)
* Add new Lithuanian debconf translation, by Gintautas Miliauskas.
(Closes: #374365)
+ * Add all/cvs-iso2022jp-roundtrip.diff, backported from CVS.
+ Fix roundtrip conversion for 0x5C character. (Closes: #375074)
-- Aurelien Jarno <aurel32@debian.org> Thu, 8 Jun 2006 08:03:49 +0200
Added: glibc-package/trunk/debian/patches/all/cvs-iso2022jp-roundtrip.diff
===================================================================
--- glibc-package/trunk/debian/patches/all/cvs-iso2022jp-roundtrip.diff 2006-06-21 01:02:53 UTC (rev 1663)
+++ glibc-package/trunk/debian/patches/all/cvs-iso2022jp-roundtrip.diff 2006-06-23 23:11:23 UTC (rev 1664)
@@ -0,0 +1,70 @@
+Update iconvdata/jis0208.[ch] to CVS HEAD to prevent problems with
+backslashes when converting from/to iso-2022-jp. Closes #375074.
+Test-case: With an UTF-8 locale,
+ $ echo '漢字\' | iconv -f utf8 -t iso-2022-jp | iconv -f iso-2022-jp -t utf8
+must display '漢字\' and not '漢字\'.
+
+Index: glibc-2.3.6/iconvdata/jis0208.c
+===================================================================
+--- glibc-2.3.6.orig/iconvdata/jis0208.c
++++ glibc-2.3.6/iconvdata/jis0208.c
+@@ -1,5 +1,5 @@
+ /* Mapping tables for JIS0208 handling.
+- Copyright (C) 1997, 1998, 2002 Free Software Foundation, Inc.
++ Copyright (C) 1997, 1998, 2002, 2004 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
+
+@@ -1783,12 +1783,20 @@
+ };
+
+
+-const char __jisx0208_from_ucs4_lat1[256][2] =
++const char __jisx0208_from_ucs4_lat1[JIS0208_LAT1_MAX + 1
++ - JIS0208_LAT1_MIN][2] =
+ {
+- [0x005C] = "\x21\x40", [0x00A2] = "\x21\x71", [0x00A3] = "\x21\x72",
+- [0x00A7] = "\x21\x78", [0x00A8] = "\x21\x2f", [0x00AC] = "\x22\x4c",
+- [0x00B0] = "\x21\x6B", [0x00B1] = "\x21\x5e", [0x00B4] = "\x21\x2d",
+- [0x00B6] = "\x22\x79", [0x00D7] = "\x21\x5f", [0x00F7] = "\x21\x60"
++ [0x00A2 - JIS0208_LAT1_MIN] = "\x21\x71",
++ [0x00A3 - JIS0208_LAT1_MIN] = "\x21\x72",
++ [0x00A7 - JIS0208_LAT1_MIN] = "\x21\x78",
++ [0x00A8 - JIS0208_LAT1_MIN] = "\x21\x2f",
++ [0x00AC - JIS0208_LAT1_MIN] = "\x22\x4c",
++ [0x00B0 - JIS0208_LAT1_MIN] = "\x21\x6B",
++ [0x00B1 - JIS0208_LAT1_MIN] = "\x21\x5e",
++ [0x00B4 - JIS0208_LAT1_MIN] = "\x21\x2d",
++ [0x00B6 - JIS0208_LAT1_MIN] = "\x22\x79",
++ [0x00D7 - JIS0208_LAT1_MIN] = "\x21\x5f",
++ [0x00F7 - JIS0208_LAT1_MIN] = "\x21\x60"
+ };
+
+
+Index: glibc-2.3.6/iconvdata/jis0208.h
+===================================================================
+--- glibc-2.3.6.orig/iconvdata/jis0208.h
++++ glibc-2.3.6/iconvdata/jis0208.h
+@@ -36,7 +36,10 @@
+ /* Conversion table. */
+ extern const uint16_t __jis0208_to_ucs[];
+
+-extern const char __jisx0208_from_ucs4_lat1[256][2];
++#define JIS0208_LAT1_MIN 0xa2
++#define JIS0208_LAT1_MAX 0xf7
++extern const char __jisx0208_from_ucs4_lat1[JIS0208_LAT1_MAX + 1
++ - JIS0208_LAT1_MIN][2];
+ extern const char __jisx0208_from_ucs4_greek[0xc1][2];
+ extern const struct jisx0208_ucs_idx __jisx0208_from_ucs_idx[];
+ extern const char __jisx0208_from_ucs_tab[][2];
+@@ -80,8 +83,8 @@
+ if (avail < 2)
+ return 0;
+
+- if (ch < 0x100)
+- cp = __jisx0208_from_ucs4_lat1[ch];
++ if (ch >= JIS0208_LAT1_MIN && ch <= JIS0208_LAT1_MAX)
++ cp = __jisx0208_from_ucs4_lat1[ch - JIS0208_LAT1_MIN];
+ else if (ch >= 0x391 && ch <= 0x451)
+ cp = __jisx0208_from_ucs4_greek[ch - 0x391];
+ else
Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series 2006-06-21 01:02:53 UTC (rev 1663)
+++ glibc-package/trunk/debian/patches/series 2006-06-23 23:11:23 UTC (rev 1664)
@@ -125,6 +125,7 @@
all/local-ru_RU.diff -p1
all/local-pt_BR.diff -p1
all/submitted-new-brf-encoding.diff -p0
+all/cvs-iso2022jp-roundtrip.diff
any/cvs-argp_h.diff -p1
any/cvs-ctan.diff -p0
Reply to: