open-src/lib/libX11/lc-ksc5601.1992-3.patch
author Naoyuki Ishimura <Naoyuki.Ishimura@Sun.COM>
Wed, 21 Jul 2010 22:22:22 -0700
changeset 986 4c9f2c882fac
parent 943 294f64612d23
child 1064 3395ca7a91bf
permissions -rw-r--r--
6929715 Xutf8TextListToTextProperty does not work for Korean text

###############################################################################
# Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#

diff -urp -x '*~' -x '*.orig' src/xlibi18n/lcCT.c src/xlibi18n/lcCT.c
--- src/xlibi18n/lcCT.c	2009-01-28 21:09:42.000000000 -0800
+++ src/xlibi18n/lcCT.c	2009-04-08 00:20:25.037179000 -0700
@@ -51,7 +51,7 @@
  * Static representation of a character set that can be used in Compound Text.
  */
 typedef struct _CTDataRec {
-    const char name[19];
+    const char name[20];
     const char ct_sequence[5];	/* Compound Text encoding, ESC sequence */
 } CTDataRec, *CTData;
 
@@ -97,6 +97,7 @@ static const CTDataRec default_ct_data[]
     { "JISX0212.1990-0:GR", /* JIS_X0212-1990      159   */ "\033$)D" },
     { "KSC5601.1987-0:GL",  /* KS_C_5601-1987      149   */ "\033$(C" },
     { "KSC5601.1987-0:GR",  /* KS_C_5601-1987      149   */ "\033$)C" },
+    { "KSC5601.1992-3:GLGR",  /* KS_C_5601-1992    149   */ "\033%/2" },
     { "CNS11643.1986-1:GL", /* CNS 11643-1992 pl.1 171   */ "\033$(G" },
     { "CNS11643.1986-1:GR", /* CNS 11643-1992 pl.1 171   */ "\033$)G" },
     { "CNS11643.1986-2:GL", /* CNS 11643-1992 pl.2 172   */ "\033$(H" },
diff -urp -x '*~' -x '*.orig' src/xlibi18n/lcGeneric.c src/xlibi18n/lcGeneric.c
--- src/xlibi18n/lcGeneric.c	2009-01-28 21:09:42.000000000 -0800
+++ src/xlibi18n/lcGeneric.c	2009-04-08 00:20:25.037898000 -0700
@@ -758,6 +758,8 @@ load_generic(
             /* 3.4.1 side */
             if (!_XlcNCompareISOLatin1(value[0], "none", 4)) {
                 codeset->side =  XlcNONE;
+            } else if (!_XlcNCompareISOLatin1(value[0], "GLGR", 4)) {
+                codeset->side =  XlcGLGR;
             } else if (!_XlcNCompareISOLatin1(value[0], "GL", 2)) {
                 codeset->side =  XlcGL;
             } else {
diff -urp -x '*~' -x '*.orig' src/xlibi18n/lcUTF8.c src/xlibi18n/lcUTF8.c
--- src/xlibi18n/lcUTF8.c	2009-01-28 21:09:43.000000000 -0800
+++ src/xlibi18n/lcUTF8.c	2009-04-08 00:20:25.071063000 -0700
@@ -210,6 +210,7 @@ typedef struct {
 #include "lcUniConv/jisx0208.h"
 #include "lcUniConv/jisx0212.h"
 #include "lcUniConv/ksc5601.h"
+#include "lcUniConv/ksc5601_1992.h"
 #include "lcUniConv/big5.h"
 #include "lcUniConv/big5_emacs.h"
 #include "lcUniConv/big5hkscs.h"
@@ -288,6 +289,9 @@ static Utf8ConvRec all_charsets[] = {
     { "KSC5601.1987-0", NULLQUARK,
 	ksc5601_mbtowc, ksc5601_wctomb
     },
+    { "KSC5601.1992-3", NULLQUARK,
+	ksc5601_1992_mbtowc, ksc5601_1992_wctomb
+    },
     { "KOI8-R", NULLQUARK,
 	koi8_r_mbtowc, koi8_r_wctomb
     },