From owner-freebsd-bugs Mon Mar 24 04:40:09 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA05977 for bugs-outgoing; Mon, 24 Mar 1997 04:40:09 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA05971; Mon, 24 Mar 1997 04:40:03 -0800 (PST) Resent-Date: Mon, 24 Mar 1997 04:40:03 -0800 (PST) Resent-Message-Id: <199703241240.EAA05971@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, junker@jazz.snu.ac.kr Received: from moderato.snu.ac.kr (moderato.snu.ac.kr [147.46.102.43]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id EAA05572 for ; Mon, 24 Mar 1997 04:29:55 -0800 (PST) Received: (from root@localhost) by moderato.snu.ac.kr (8.8.5/8.8.5) id VAA29459; Mon, 24 Mar 1997 21:30:42 +0900 (KST) Message-Id: <199703241230.VAA29459@moderato.snu.ac.kr> Date: Mon, 24 Mar 1997 21:30:42 +0900 (KST) From: junker@jazz.snu.ac.kr Reply-To: junker@jazz.snu.ac.kr To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: misc/3079: locale update for ko_KR.EUC Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 3079 >Category: misc >Synopsis: ko_KR.EUC not work >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Mar 24 04:40:01 PST 1997 >Last-Modified: >Originator: Choi Jun Ho >Organization: NARAE, CS Dept, Seoul National Univ, Korea >Release: FreeBSD 2.2-RELEASE i386 >Environment: FreeBSD moderato.snu.ac.kr 2.2-RELEASE FreeBSD 2.2-RELEASE #0: Wed Mar 19 21:51:45 KST 1997 junker@moderato.snu.ac.kr:/usr/src/sys/compile/MODERATO i386 >Description: There is a bug for LC_CTYPE definition of ko_KR.EUC. It reports NULL in return from setlocale(). It lacks the definition of codeset 3 and 4. In addition, to work the locale correctly, there need two things more: LC_TIME and LC_COLLATE It is some kind of same problem for ja_JP.EUC. >How-To-Repeat: Run this program:(like send-pr(2283)) #include #include #include main() { char *p; p = setlocale(LC_ALL, "ko_KR.EUC"); if (p == NULL) { printf("setlocale() returns NULL\n"); } else { printf("setlocale() returns \"%s\"\n", p); } exit(0); } cc -o localetest locale.c -lxpg4 $ env LANG=ko_KR.EUC localetest setlocale() returns NULL >Fix: 1. Change /usr/src/usr.bin/mklocale/data/ko_KR.EUC.src to the following: -----------------CUT HERE----------------------------------- *** ../../ko_KR.EUC.src Mon Mar 24 21:20:28 1997 --- ko_KR.EUC.src Mon Mar 24 21:18:03 1997 *************** *** 1,9 **** /* ! * Korean LOCALE_CTYPE definitions using EUC-KR character sets * * Choi Jun Ho, junker@jazz.snu.ac.kr * NARAE, Seoul National Univ., CS Dept. ! * Mar 11 1997 * * It is based on manpage mklocale(1), euc(4), ja_JP.EUC.src. * --- 1,10 ---- /* ! * Korean LC_CTYPE definitions using EUC-KR character sets ! * (ko_KR.EUC.src) * * Choi Jun Ho, junker@jazz.snu.ac.kr * NARAE, Seoul National Univ., CS Dept. ! * Last Updated on Mar 24 1997 * * It is based on manpage mklocale(1), euc(4), ja_JP.EUC.src. * *************** *** 11,24 **** ENCODING "EUC" ! /* EUC-KR * 0xa1a1-0xfefe * byte 1: 0xa1-0xfe * byte 2: 0xa1-0xfe */ ! /* we have codeset 1 and 2 */ ! VARIABLE 1 0x0000 2 0x8080 0x8080 /* * Code Set 1, US-ASCII equivalent --- 12,27 ---- ENCODING "EUC" ! /* EUC-KR(KS C 5601.1992) * 0xa1a1-0xfefe * byte 1: 0xa1-0xfe * byte 2: 0xa1-0xfe */ ! /* We have only codeset 1 and 2, so others are dummy. ! But it must be defined to work in 2.2 xpg4 locale routine... ! */ ! VARIABLE 1 0x0000 2 0x8080 2 0x0080 3 0x8000 0x8080 /* * Code Set 1, US-ASCII equivalent *************** *** 70,82 **** MAPLOWER < 0xaca1 - 0xacc1 : 0xacd1 > < 0xacd1 - 0xacf1 : 0xacd1 > MAPUPPER < 0xaca1 - 0xacc1 : 0xaca1 > < 0xacd1 - 0xacf1 : 0xaca1 > ! DIGIT 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* greek digit */ ! SPECIAL 0xa6a1 - 0xa6e4 0xa7a1 - 0xa7ef /* symbols */ ! SPECIAL 0xa8a1 - 0xa8fe 0xa9a1 - 0xa9fe /* circle symbols */ ! ! PHONOGRAM 0xa4a1 - 0xa4fe /* full-width hangul glyph */ ! PHONOGRAM 0xaaa1 - 0xaaf3 /* full-width hirakana */ ! PHONOGRAM 0xaba1 - 0xabf6 /* full-width katakana */ PHONOGRAM 0xb0a1 - 0xb0fe 0xb1a1 - 0xb1fe 0xb2a1 - 0xb2fe PHONOGRAM 0xb3a1 - 0xb3fe 0xb4a1 - 0xb4fe 0xb5a1 - 0xb5fe --- 73,85 ---- MAPLOWER < 0xaca1 - 0xacc1 : 0xacd1 > < 0xacd1 - 0xacf1 : 0xacd1 > MAPUPPER < 0xaca1 - 0xacc1 : 0xaca1 > < 0xacd1 - 0xacf1 : 0xaca1 > ! DIGIT 0xa5a1 - 0xa5aa 0xa5b0 - 0xa5b9 /* Greek Digit */ ! SPECIAL 0xa6a1 - 0xa6e4 0xa7a1 - 0xa7ef /* Symbols */ ! SPECIAL 0xa8a1 - 0xa8fe 0xa9a1 - 0xa9fe /* Circle Symbols */ ! ! PHONOGRAM 0xa4a1 - 0xa4fe /* Full-width Hangul glyph */ ! PHONOGRAM 0xaaa1 - 0xaaf3 /* Full-width Hirakana */ ! PHONOGRAM 0xaba1 - 0xabf6 /* Full-width Katakana */ PHONOGRAM 0xb0a1 - 0xb0fe 0xb1a1 - 0xb1fe 0xb2a1 - 0xb2fe PHONOGRAM 0xb3a1 - 0xb3fe 0xb4a1 - 0xb4fe 0xb5a1 - 0xb5fe *************** *** 86,92 **** PHONOGRAM 0xbfa1 - 0xbffe 0xc0a1 - 0xc0fe 0xc1a1 - 0xc1fe PHONOGRAM 0xc2a1 - 0xc2fe 0xc3a1 - 0xc3fe 0xc4a1 - 0xc4fe PHONOGRAM 0xc5a1 - 0xc5fe 0xc6a1 - 0xc6fe 0xc7a1 - 0xc7fe ! PHONOGRAM 0xc8a1 - 0xc8fe /* hangul composed */ IDEOGRAM 0xcaa1 - 0xcafe 0xcba1 - 0xcbfe 0xcca1 - 0xccfe IDEOGRAM 0xcda1 - 0xcdfe 0xcea1 - 0xcefe 0xcfa1 - 0xcffe --- 89,95 ---- PHONOGRAM 0xbfa1 - 0xbffe 0xc0a1 - 0xc0fe 0xc1a1 - 0xc1fe PHONOGRAM 0xc2a1 - 0xc2fe 0xc3a1 - 0xc3fe 0xc4a1 - 0xc4fe PHONOGRAM 0xc5a1 - 0xc5fe 0xc6a1 - 0xc6fe 0xc7a1 - 0xc7fe ! PHONOGRAM 0xc8a1 - 0xc8fe /* Hangul composed */ IDEOGRAM 0xcaa1 - 0xcafe 0xcba1 - 0xcbfe 0xcca1 - 0xccfe IDEOGRAM 0xcda1 - 0xcdfe 0xcea1 - 0xcefe 0xcfa1 - 0xcffe *************** *** 105,111 **** IDEOGRAM 0xf4a1 - 0xf4fe 0xf5a1 - 0xf5fe 0xf6a1 - 0xf6fe IDEOGRAM 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe IDEOGRAM 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe ! IDEOGRAM 0xfda1 - 0xfdfe /* hanja */ ! /* we don't have codeset 3 and 4 */ ! /* end of LC_CTYPE definition */ --- 108,119 ---- IDEOGRAM 0xf4a1 - 0xf4fe 0xf5a1 - 0xf5fe 0xf6a1 - 0xf6fe IDEOGRAM 0xf7a1 - 0xf7fe 0xf8a1 - 0xf8fe 0xf9a1 - 0xf9fe IDEOGRAM 0xfaa1 - 0xfafe 0xfba1 - 0xfbfe 0xfca1 - 0xfcfe ! IDEOGRAM 0xfda1 - 0xfdfe /* Hanja */ ! ! /* We don't have codeset 3 and 4. ! So codeset 3 is only dummy definition ! */ ! PRINT 0xa1 - 0xfe ! SPECIAL 0xa1 - 0xfe ! /* End of LC_CTYPE definition */ -----------------CUT HERE----------------------------------- 2. make and install new LC_CTYPE $ mklocale ko_KR.EUC.src > /usr/share/locale/ko_KR.EUC/LC_CTYPE 3. make new LC_TIME This is LC_TIME definition for ko_KR.EUC: begin 644 LC_TIME M(#&_^0H@,K_Y"B`SO_D*(#2_^0H@-;_Y"B`VO_D*(#>_^0H@.+_Y"B`YO_D* M,3"_^0HQ,;_Y"C$RO_D*,;_Y"C*_^0HSO_D*-+_Y"C6_^0HVO_D*-[_Y"CB_ M^0HYO_D*,3"_^0HQ,;_Y"C$RO_D*P,\*O_D*R*T*O/8*N/$*L=T*Q>0*P,^_ MY,#/"K_YO^3`SPK(K;_DP,\*O/:_Y,#/"KCQO^3`SPJQW;_DP,\*Q>2_Y,#/ M"B5(O<,@)4VZT"`E4\/*"B5Y+R5M+R5D"B59L^(@)6(@)67`SR`E8;_DP,\@ G)5@*O\#`_`J_P,C$"B59L^(@)6(@)67`SR`E8;_DP,\@)5@@)5H* ` end (it must be protected from possible charset conversion or 7-bit strip for mail transfer because it contain 8-bit EUC-KR characters) 4. install LC_TIME $ cp LC_TIME /usr/share/locale/ko_KR.EUC/LC_TIME 5. make dummy LC_COLLATE $ cp /usr/share/locale/lt_LN.ISO_8859-1/LC_COLLATE \ /usr/share/locale/ko_KR.EUC/LC_COLLATE It is something not standard way, but I didn't define LC_COLLATE for now... (it is difficult for define this in our charset. so many chars!) 6. complete. >Audit-Trail: >Unformatted: