summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-07-07 06:41:18 +0000
committerUlrich Drepper <drepper@redhat.com>2000-07-07 06:41:18 +0000
commit2528edd3176df331320f366ff3dad88cb6d82533 (patch)
treed0537f9f5029e45bda16088ff7d206bddb5da129
parent9bcadd4e212c475e0dedcd9ac2e371bec6aa7c01 (diff)
downloadglibc-2528edd3176df331320f366ff3dad88cb6d82533.tar.gz
glibc-2528edd3176df331320f366ff3dad88cb6d82533.tar.xz
glibc-2528edd3176df331320f366ff3dad88cb6d82533.zip
Update.
	* iconvdata/euc-jp.c: Map characters in C1 area to itself.
	* iconvdata/euc-kr.c: Likewise.
-rw-r--r--ChangeLog3
-rw-r--r--iconvdata/euc-jp.c9
-rw-r--r--iconvdata/euc-kr.c6
-rw-r--r--localedata/ChangeLog1
-rw-r--r--localedata/charmaps/EUC-KR36
5 files changed, 47 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 27ef3f9e49..1add3ad047 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
 
+	* iconvdata/euc-jp.c: Map characters in C1 area to itself.
+	* iconvdata/euc-kr.c: Likewise.
+
 	* stdio-common/vfprintf.c (process_string_arg): Check result of
 	wcrtomb call and bail out if it failed.
 
diff --git a/iconvdata/euc-jp.c b/iconvdata/euc-jp.c
index c6a39b08ec..8d8429614d 100644
--- a/iconvdata/euc-jp.c
+++ b/iconvdata/euc-jp.c
@@ -45,10 +45,9 @@
   {									      \
     uint32_t ch = *inptr;						      \
 									      \
-    if (ch <= 0x7f)							      \
+    if (ch < 0x8e || (ch >= 0x90 && ch <= 0x9f))			      \
       ++inptr;								      \
-    else if ((__builtin_expect (ch, 0xa1) <= 0xa0 && ch != 0x8e && ch != 0x8f)\
-	     || __builtin_expect (ch, 0xfe) > 0xfe)			      \
+    else if (ch == 0xff)						      \
       {									      \
 	/* This is illegal.  */						      \
 	if (! ignore_errors_p ())					      \
@@ -168,8 +167,8 @@
   {									      \
     uint32_t ch = get32 (inptr);					      \
 									      \
-    if (ch <= 0x7f)							      \
-      /* It's plain ASCII.  */						      \
+    if (ch < 0x8e || (ch >= 0x90 && ch <= 0x9f))			      \
+      /* It's plain ASCII or C1.  */					      \
       *outptr++ = ch;							      \
     else if (ch == 0xa5)						      \
       /* YEN sign => backslash  */					      \
diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c
index abb40c8908..786695801c 100644
--- a/iconvdata/euc-kr.c
+++ b/iconvdata/euc-kr.c
@@ -27,7 +27,7 @@
 static inline void
 euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
 {
-  if (ch > 0x7f)
+  if (ch > 0x9f)
     {
       if (__builtin_expect (ucs4_to_ksc5601 (ch, cp, 2), 0)
 	  != __UNKNOWN_10646_CHAR)
@@ -75,12 +75,12 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp)
 	 ch = (uint32_t) inchar;					      \
     */									      \
 									      \
-    if (ch <= 0x7f)							      \
+    if (ch <= 0x9f)							      \
       /* Plain ASCII.  */						      \
       ++inptr;								      \
     /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are		      \
        user-defined areas.  */						      \
-    else if (__builtin_expect (ch, 0xa1) <= 0xa0			      \
+    else if (__builtin_expect (ch, 0xa1) == 0xa0			      \
 	     || __builtin_expect (ch, 0xa1) > 0xfe			      \
 	     || __builtin_expect (ch, 0xa1) == 0xc9)			      \
       {									      \
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 69982eb5e6..6f64baaed3 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,6 +1,7 @@
 2000-07-06  Ulrich Drepper  <drepper@redhat.com>
 
 	* charmaps/EUC-JP: Make characters in C1 area map to themselves.
+	* charmaps/EUC-KR: Likewise.
 
 2000-07-06  Jakub Jelinek  <jakub@redhat.com>
 
diff --git a/localedata/charmaps/EUC-KR b/localedata/charmaps/EUC-KR
index 41e3cc1cb1..82093f7f88 100644
--- a/localedata/charmaps/EUC-KR
+++ b/localedata/charmaps/EUC-KR
@@ -138,6 +138,42 @@ CHARMAP
 <U007F>     /x7f         DELETE

 

 %

+% C1 area.

+%

+<U0080>     /x80         PADDING CHARACTER (PAD)

+<U0081>     /x81         HIGH OCTET PRESET (HOP)

+<U0082>     /x82         BREAK PERMITTED HERE (BPH)

+<U0083>     /x83         NO BREAK HERE (NBH)

+<U0084>     /x84         INDEX (IND)

+<U0085>     /x85         NEXT LINE (NEL)

+<U0086>     /x86         START OF SELECTED AREA (SSA)

+<U0087>     /x87         END OF SELECTED AREA (ESA)

+<U0088>     /x88         CHARACTER TABULATION SET (HTS)

+<U0089>     /x89         CHARACTER TABULATION WITH JUSTIFICATION (HTJ)

+<U008A>     /x8a         LINE TABULATION SET (VTS)

+<U008B>     /x8b         PARTIAL LINE FORWARD (PLD)

+<U008C>     /x8c         PARTIAL LINE BACKWARD (PLU)

+<U008D>     /x8d         REVERSE LINE FEED (RI)

+<U008E>     /x8e         SINGLE-SHIFT TWO (SS2)

+<U008F>     /x8f         SINGLE-SHIFT THREE (SS3)

+<U0090>     /x90         DEVICE CONTROL STRING (DCS)

+<U0091>     /x91         PRIVATE USE ONE (PU1)

+<U0092>     /x92         PRIVATE USE TWO (PU2)

+<U0093>     /x93         SET TRANSMIT STATE (STS)

+<U0094>     /x94         CANCEL CHARACTER (CCH)

+<U0095>     /x95         MESSAGE WAITING (MW)

+<U0096>     /x96         START OF GUARDED AREA (SPA)

+<U0097>     /x97         END OF GUARDED AREA (EPA)

+<U0098>     /x98         START OF STRING (SOS)

+<U0099>     /x99         SINGLE GRAPHIC CHARACTER INTRODUCER (SGCI)

+<U009A>     /x9a         SINGLE CHARACTER INTRODUCER (SCI)

+<U009B>     /x9b         CONTROL SEQUENCE INTRODUCER (CSI)

+<U009C>     /x9c         STRING TERMINATOR (ST)

+<U009D>     /x9d         OPERATING SYSTEM COMMAND (OSC)

+<U009E>     /x9e         PRIVACY MESSAGE (PM)

+<U009F>     /x9f         APPLICATION PROGRAM COMMAND (APC)

+

+%

 % KS C 5601-1992

 %

 <UC7B8>     /xa0/x41     HANGUL SYLLABLE CIEUC-AE-RIEULSIOS