tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: localeio



I'll reply to this with multiple replies.  Here is the first one.

On Wed, May 28, 2008 at 01:18:01AM +0900, Takehiko NOZAKI wrote:
> hi,
> 
> > > 1. please don't install LC_* those codeset is not supported by
> > > iconv_open(3) yet,
> > > such as ISCII-DEV(LC_CTYPE that i maintain keep this rule).
> >
> > Fine, I have no problem with this.  Do you have such a list?
> 
> as far as i glanced:
> 
> * be_BY.CP1131
>   iconv(3) is ok, but LC_CTYPE is not.
>   we can get be_BY.CP1131's LC_CTYPE src from FreeBSD too,
>   but request we got is only CP1251.
>   http://mail-index.netbsd.org/tech-userlevel/2006/03/14/0000.html
>   (hi, cheusov!)

OK.  How about this patch:

Index: Makefile
===================================================================
RCS file: /cvsroot/src/share/locale/ctype/Makefile,v
retrieving revision 1.26
diff -u -r1.26 Makefile
--- Makefile    14 Mar 2007 15:49:26 -0000      1.26
+++ Makefile    28 May 2008 01:39:01 -0000
@@ -15,6 +15,9 @@
 LOCALES += af_ZA.ISO8859-15
  LOCALESRC_af_ZA.ISO8859-15 = en_US.DIS_8859-15
 
+LOCALES += be_BY.CP1131
+ LOCALESRC_be_BY.CP1131 = be_BY.CP1131
+
 LOCALES += be_BY.CP1251
  LOCALESRC_be_BY.CP1251 = bg_BG.CP1251
 
Index: be_BY.CP1131.src
===================================================================
RCS file: be_BY.CP1131.src
diff -N be_BY.CP1131.src
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ be_BY.CP1131.src    28 May 2008 01:39:01 -0000
@@ -0,0 +1,66 @@
+/*
+ * Belarusian language. Modern/standard (1959) grammar.
+ * Prepared by Yury Tarasievich <spytar%yahoo.com@localhost>
+ * From: $FreeBSD: src/share/mklocale/be_BY.CP1131.src,v 1.2 2005/04/21 
09:15:19 ache Exp $
+ * $NetBSD$
+ */
+
+ENCODING       "NONE"
+VARIABLE        Belarusian CP1131 (extending the and based on: Russian 
Alternative code table (CP866) by <ache%nagual.pp.ru@localhost>)
+
+#
+# This is a comment
+#
+ALPHA           'A' - 'Z' 'a' - 'z' 0x80 - 0xaf 0xe0 - 0xf7
+CONTROL                0x00 - 0x1f 0x7f
+DIGIT          '0' - '9'
+GRAPH           0x21 - 0x7e 0x80 - 0xfe
+LOWER           'a' - 'z' 0xa0 - 0xaf 0xe0 - 0xef 0xf1 0xf3 0xf5 0xf7
+PUNCT          0x21 - 0x2f 0x3a - 0x40 0x5b - 0x60 0x7b - 0x7e
+PUNCT           0xb0 - 0xdf 0xf8 - 0xfe
+SPACE          0x09 - 0x0d 0x20 0xff
+UPPER           'A' - 'Z' 0x80 - 0x9f 0xf0 0xf2 0xf4 0xf6
+XDIGIT          '0' - '9' 'a' - 'f' 'A' - 'F'
+BLANK          ' ' '\t' 0xff
+PRINT          0x20 - 0x7e 0x80 - 0xff
+
+MAPLOWER               <'A' - 'Z' : 'a'>
+MAPLOWER               <'a' - 'z' : 'a'>
+MAPLOWER        <0x80 - 0x8f : 0xa0>
+MAPLOWER        <0x90 - 0x9f : 0xe0>
+MAPLOWER        <0xa0 - 0xaf : 0xa0>
+MAPLOWER        <0xe0 - 0xef : 0xe0>
+MAPLOWER        <0xf0  0xf1>
+MAPLOWER        <0xf1  0xf1>
+MAPLOWER        <0xf2  0xf3>
+MAPLOWER        <0xf3  0xf3>
+MAPLOWER        <0xf4  0xf5>
+MAPLOWER        <0xf5  0xf5>
+MAPLOWER        <0xf6  0xf7>
+MAPLOWER        <0xf7  0xf7>
+MAPLOWER        <0xf8  0xf9>
+MAPLOWER        <0xf9  0xf9>
+MAPLOWER        <0xfc  0xfd>
+MAPLOWER        <0xfd  0xfd>
+
+MAPUPPER               <'A' - 'Z' : 'A'>
+MAPUPPER               <'a' - 'z' : 'A'>
+MAPUPPER        <0x80 - 0x9f : 0x80>
+MAPUPPER        <0xa0 - 0xaf : 0x80>
+MAPUPPER        <0xe0 - 0xef : 0x90>
+MAPUPPER        <0xf0  0xf0>
+MAPUPPER        <0xf1  0xf0>
+MAPUPPER        <0xf2  0xf2>
+MAPUPPER        <0xf3  0xf2>
+MAPUPPER        <0xf4  0xf4>
+MAPUPPER        <0xf5  0xf4>
+MAPUPPER        <0xf6  0xf6>
+MAPUPPER        <0xf7  0xf6>
+MAPUPPER        <0xf8  0xf8>
+MAPUPPER        <0xf9  0xf8>
+MAPLOWER        <0xfc  0xfc>
+MAPLOWER        <0xfd  0xfc>
+
+TODIGIT        <'0' - '9' : 0>
+TODIGIT        <'A' - 'F' : 10>
+TODIGIT        <'a' - 'f' : 10>

> 
> * am_ET.UTF-8, he_IL.UTF-8, mn_MN.UTF-8
>   LC_CTYPE support is missing.
>   yes, we can add en_US.UTF-8 -> {am_ET,he_IL,mn_MN}.UTF-8 alias.

OK.  How about this patch:

Index: locale.alias
===================================================================
RCS file: /cvsroot/src/share/locale/locale.alias,v
retrieving revision 1.8
diff -u -r1.8 locale.alias
--- locale.alias        14 Mar 2007 15:49:25 -0000      1.8
+++ locale.alias        28 May 2008 02:04:26 -0000
@@ -6,6 +6,7 @@
 
 # UTF-8 ctypes - These are the same as en_US.UTF-8 for now.
 af_ZA.UTF-8/LC_CTYPE           en_US.UTF-8
+am_ET.UTF-8/LC_CTYPE           en_US.UTF-8
 be_BY.UTF-8/LC_CTYPE           en_US.UTF-8
 bg_BG.UTF-8/LC_CTYPE           en_US.UTF-8
 ca_ES.UTF-8/LC_CTYPE           en_US.UTF-8
@@ -27,6 +28,7 @@
 fr_CA.UTF-8/LC_CTYPE           en_US.UTF-8
 fr_CH.UTF-8/LC_CTYPE           en_US.UTF-8
 fr_FR.UTF-8/LC_CTYPE           en_US.UTF-8
+he_IL.UTF-8/LC_CTYPE           en_US.UTF-8
 hr_HR.UTF-8/LC_CTYPE           en_US.UTF-8
 hu_HU.UTF-8/LC_CTYPE           en_US.UTF-8
 hy_AM.UTF-8/LC_CTYPE           en_US.UTF-8
@@ -37,6 +39,7 @@
 kk_KZ.UTF-8/LC_CTYPE           en_US.UTF-8
 ko_KR.UTF-8/LC_CTYPE           en_US.UTF-8
 lt_LT.UTF-8/LC_CTYPE           en_US.UTF-8
+mn_MN.UTF-8/LC_CTYPE           en_US.UTF-8
 nb_NO.UTF-8/LC_CTYPE           en_US.UTF-8
 nl_BE.UTF-8/LC_CTYPE           en_US.UTF-8
 nl_NL.UTF-8/LC_CTYPE           en_US.UTF-8

> 
> * hi_IN.ISCII-DEV
>   LC_CTYPE and iconv(3) support missing.
>   i need conversion table, i have been looking for.

Can we use the LC_TYPE information from FreeBSD?

> 
> * zh_CN.GB2312
>   zh_CN.GB2312 should an alias of zh_CN.eucCN,
>   this is FreeBSD's redundancy.

OK.  How about this patch:

Index: messages/Makefile
===================================================================
RCS file: /cvsroot/src/share/locale/messages/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- messages/Makefile   24 May 2008 02:56:55 -0000      1.2
+++ messages/Makefile   28 May 2008 01:51:37 -0000
@@ -195,9 +195,6 @@
 LOCALES += zh_CN.GB18030
  LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030
 
-LOCALES += zh_CN.GB2312
- LOCALESRC_zh_CN.GB2312 = zh_CN.GB2312
-
 LOCALES += zh_CN.UTF-8
  LOCALESRC_zh_CN.UTF-8 = zh_CN.UTF-8
 
Index: messages/zh_CN.GB2312.src
===================================================================
RCS file: messages/zh_CN.GB2312.src
diff -N messages/zh_CN.GB2312.src
--- messages/zh_CN.GB2312.src   17 May 2008 03:57:52 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-# $NetBSD: zh_CN.GB2312.src,v 1.1 2008/05/17 03:57:52 ginsbach Exp $
-#
-# Chinese Language Message Locale for China
-#
-# WARNING: Empty lines and/or blank spaces may be essential.
-#
-# From: $FreeBSD: src/share/msgdef/zh_CN.GB2312.src,v 1.1 2003/11/05 22:59:02 
davidxu Exp $
-#
-# Acceptable Affrimative Response Expression (yesexpr)
-#    NOTE: This must be a valid Extended Regular Expression.
-^[yYyY是].*
-# Acceptable Negative Response Expression (noexpr)
-#    NOTE: This must be a valid Extended Regular Expression.
-^[nNnN不否].*
-#
-# NOTE: The following were removed from the relevant standards:
-#       The Open Group Base Specifications Issue 6 (XPG6) and
-#       IEEE Std 1003.1, 2004 Edition (POSIX).
-#      The current NetBSD implementation still requires a value or blank line.
-#
-# Acceptable Affrimative Response (yesstr)
-是
-# Acceptable Negative  Response (nostr)
-否
-# EOF
Index: monetary/Makefile
===================================================================
RCS file: /cvsroot/src/share/locale/monetary/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- monetary/Makefile   24 May 2008 02:56:55 -0000      1.2
+++ monetary/Makefile   28 May 2008 01:51:37 -0000
@@ -219,9 +219,6 @@
 LOCALES += zh_CN.GB18030
  LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030
 
-LOCALES += zh_CN.GB2312
- LOCALESRC_zh_CN.GB2312 = zh_CN.GB2312
-
 LOCALES += zh_CN.UTF-8
  LOCALESRC_zh_CN.UTF-8 = zh_CN.UTF-8
 
Index: monetary/zh_CN.GB2312.src
===================================================================
RCS file: monetary/zh_CN.GB2312.src
diff -N monetary/zh_CN.GB2312.src
--- monetary/zh_CN.GB2312.src   17 May 2008 04:05:52 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,109 +0,0 @@
-# $NetBSD: zh_CN.GB2312.src,v 1.1 2008/05/17 04:05:52 ginsbach Exp $
-#
-# Chinese Language Monetary Locale for China
-#
-# WARNING: Empty lines and/or blank spaces may be essential.
-#
-# From: $FreeBSD: src/share/monetdef/zh_CN.GB2312.src,v 1.1 2003/11/05 
22:59:02 davidxu Exp $
-#
-# International Currency Symbol (int_curr_symbol)
-#     NOTE: Last character is always SPACE
-#
-CNY
-#
-# Currency Symbol (currency_symbol)
-#
-¥
-#
-# Monetary Decimal Point (mon_decimal_point)
-#
-.
-#
-# Monetary Thousands Separator (mon_thousands_sep)
-#
-,
-#
-# Monetary Grouping Sequence (mon_grouping)
-#    A sequence of integers separated by semi-colons ';'.
-#
-3;3
-#
-# Positive Sign (positive_sign)
-#
-
-#
-# Negative Sign (negative_sign)
-#
--
-#
-# International Fractional Digits (int_frac_digits)
-#
-0
-#
-# Fractional Digits (frac_digits)
-#
-0
-#
-# Currency Symbol Precedes Positive Value (p_cs_preceds)
-#    Must be either 1 or 0.
-#
-1
-#
-# Separation of Currency Symbol, Sign, and Positive Value
-#      by a Space (p_sep_by_space)
-#    Must be 0, 1, or 2
-#
-0
-#
-# Currency Symbol Precedes Negative Value (n_cs_preceds)
-#    Must be either 1 or 0.
-#
-1
-#
-# Separation of Currency Symbol, Sign, and Negative Value (n_sep_by_space)
-#    Must be 0, 1, or 2
-#
-0
-#
-# Positive Sign Position (p_sign_posn)
-#    Must be 0, 1, 2, 3, or 4
-#
-1
-#
-# Negative Sign Position (n_sign_posn)
-#    Must be 0, 1, 2, 3, or 4
-#
-4
-#
-# International Currency Symbol Precedes       Positive Value 
(int_p_cs_preceds)
-#    Must be either 1 or 0.
-#
-1
-#
-# Separation of International Currency Symbol, Sign, and
-#      Positive Value (int_p_sep_by_space)
-#    Must be 0, 1, or 2
-#
-0
-#
-# International Currency Symbol Precedes Negative Value (int_n_cs_preceds)
-#    Must be either 1 or 0.
-#
-1
-#
-# Separation of International Currency Symbol, Sign, and
-#      Negative Value (int_n_sep_by_space)
-#    Must be 0, 1, or 2
-#
-0
-#
-# International Positive Sign Position (int_p_sign_posn)
-#    Must be 0, 1, 2, 3, or 4
-#
-1
-#
-# International Negative Sign Position (int_n_sign_posn)
-#    Must be 0, 1, 2, 3, or 4
-#
-4
-# EOF
Index: time/Makefile
===================================================================
RCS file: /cvsroot/src/share/locale/time/Makefile,v
retrieving revision 1.2
diff -u -r1.2 Makefile
--- time/Makefile       24 May 2008 02:56:55 -0000      1.2
+++ time/Makefile       28 May 2008 01:51:38 -0000
@@ -273,9 +273,6 @@
 LOCALES += zh_CN.GB18030
  LOCALESRC_zh_CN.GB18030 = zh_CN.GB18030
 
-LOCALES += zh_CN.GB2312
- LOCALESRC_zh_CN.GB2312 = zh_CN.GB2312
-
 LOCALES += zh_CN.UTF-8
  LOCALESRC_zh_CN.UTF-8 = zh_CN.UTF-8
 
Index: time/zh_CN.GB2312.src
===================================================================
RCS file: time/zh_CN.GB2312.src
diff -N time/zh_CN.GB2312.src
--- time/zh_CN.GB2312.src       17 May 2008 04:11:30 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,79 +0,0 @@
-# $NetBSD: zh_CN.GB2312.src,v 1.1 2008/05/17 04:11:30 ginsbach Exp $
-#
-# Chinese Language Time Locale for China
-#
-# WARNING: Empty lines and/or blank spaces may be essential.
-#
-# From: $FreeBSD: src/share/timedef/zh_CN.GB2312.src,v 1.3 2007/12/30 03:08:52 
ache Exp $
-#
-# Short weekday names (abday)
-#
-日
-一
-二
-三
-四
-五
-六
-#
-# Long weekday names (day)
-#
-星期日
-星期一
-星期二
-星期三
-星期四
-星期五
-星期六
-#
-# Short month names (abmon)
-#
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
-10
-11
-12
-#
-# Long month names (mon)
-#
-一月
-二月
-三月
-四月
-五月
-六月
-七月
-八月
-九月
-十月
-十一月
-十二月
-#
-# Ante Meridiem/Post Meridiem - %p (am_pm)
-#
-上午
-下午
-#
-# Date and Time - %c (d_t_fmt)
-#
-%a %b/%e %T %Y
-#
-# Date - %x (d_fmt)
-#
-%Y/%m/%d
-#
-# Time - %X (t_fmt)
-#
-%H时%M分%S秒
-#
-# 12-hour Clock - %r (t_ampm_fmt)
-#
-%I:%M:%S %p
-# EOF

--
Brian Ginsbach



Home | Main Index | Thread Index | Old Index