From a1e88b9a2fe01ed6bb3ba749af7d98e89bb14d3f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Wed, 8 Nov 2000 08:08:09 +0000 Subject: Update. 2000-11-08 Ulrich Drepper * iconvdata/euc-kr.c (euckr_from_ucs4): Map 0x20a9 to \xa3dc. (BODY from direction): Remove special handling of \x5c. * iconvdata/EUC-KR.irreversible: Adjust for this change. * iconvdata/testdata/EUC-KR..UTF8: Likewise. Reported by Jungshik Shin . --- iconvdata/EUC-KR.irreversible | 2 +- iconvdata/euc-kr.c | 17 +++++++---------- iconvdata/testdata/EUC-KR..UTF8 | 2 +- 3 files changed, 9 insertions(+), 12 deletions(-) (limited to 'iconvdata') diff --git a/iconvdata/EUC-KR.irreversible b/iconvdata/EUC-KR.irreversible index 4eadbb3..95aa4d4 100644 --- a/iconvdata/EUC-KR.irreversible +++ b/iconvdata/EUC-KR.irreversible @@ -1 +1 @@ -0x5C 0x005C +0xA3DC 0x20A9 diff --git a/iconvdata/euc-kr.c b/iconvdata/euc-kr.c index 0b4e29a..5ecdbb8 100644 --- a/iconvdata/euc-kr.c +++ b/iconvdata/euc-kr.c @@ -31,9 +31,12 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) { if (__builtin_expect (ch, 0) == 0x20a9) { - /* Half-width Korean Currency WON sign. */ - cp[0] = '\\'; - cp[1] = '\0'; + /* Half-width Korean Currency WON sign. There is no + equivalent in EUC-KR. Some mappings use \x5c because + this is what some old Korean ASCII variants used but this + is causing problems. We map it to the FULL WIDTH WON SIGN. */ + cp[0] = '\xa3'; + cp[1] = '\xdc'; } else if (__builtin_expect (ucs4_to_ksc5601 (ch, cp, 2), 0) != __UNKNOWN_10646_CHAR) @@ -75,13 +78,7 @@ euckr_from_ucs4 (uint32_t ch, unsigned char *cp) uint32_t ch = *inptr; \ \ if (ch <= 0x9f) \ - { \ - /* Plain ASCII with one exception. */ \ - if (ch == 0x5c) \ - /* Half-width Korean Currency WON sign. */ \ - ch = 0x20a9; \ - ++inptr; \ - } \ + ++inptr; \ /* 0xfe(->0x7e : row 94) and 0xc9(->0x59 : row 41) are \ user-defined areas. */ \ else if (__builtin_expect (ch, 0xa1) == 0xa0 \ diff --git a/iconvdata/testdata/EUC-KR..UTF8 b/iconvdata/testdata/EUC-KR..UTF8 index b6c484f..e287e76 100644 --- a/iconvdata/testdata/EUC-KR..UTF8 +++ b/iconvdata/testdata/EUC-KR..UTF8 @@ -1,7 +1,7 @@ ! " # $ % & ' ( ) * + , - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E F G H I J K L M N O - P Q R S T U V W X Y Z [ ₩ ] ^ _ + P Q R S T U V W X Y Z [ \ ] ^ _ ` a b c d e f g h i j k l m n o p q r s t u v w x y z { | } ~ -- cgit v1.1