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

[plamo:14778] locale(Re: Re: JustSystem JustArks¡¡Æ°ºî¤Ë¤Ä¤¤¤Æ)



¤³¤¸¤Þ¡÷NHK ¥é¥¸¥ª¤Î¡Ö¥é¥¸¥ª±Ñ²ñÏà Let's speak¡×¤Î¹Ö»Õ¤Ã¤Æ¡¢´ä¼·½Æ
¤ó¤À¤Ã¤¿¤Î¤«¡¢¡¢¤Ç¤¹¡£

# ¥é¥¸¥ª¤Çʹ¤¤¤Æ¤ë¤ÈºÇ½é¤Î¼«¸Ê¾Ò²ð¤¬¡Ö´ä¼¥±¥¤ ¤Ê¤ó¤Ç¤¹¡×¤Èʹ¤³¤¨¤Æ¡¢
# ¤º¤¤¤Ö¤ó·Ú¤¤¥Î¥ê¤Î¿Í¤À¤Ê¤¡¡¢¤È 4·î¤«¤é»×¤¤¤³¤ó¤Ç¤¤¤¿¡¢¡¢(¶ì¾Ð)

From: naomijj@hi-ho.ne.jp
Subject: [plamo:14776] Re: JustSystem Just Arks¡¡Æ°ºî¤Ë¤Ä¤¤¤Æ
Date: Tue, 16 Jul 2002 22:48:37 +0900

> > ¤³¤³¤À¤±¤Ç¤¹¤¬¡¢¡¢¡¢
> > LC_* ¤ò¤¹¤Ù¤ÆÀßÄꤹ¤ë¤È¤¤¤¦°ÕÌ£¤À¤Ã¤¿¤È»×¤¤¤Þ¤¹¡£
> > 
> > man setlocale
> 
> LC¤È¤Ï¡¢¥í¥±¡¼¥ë¤Î°ÕÌ£¤Ê¤Î¤Ç¤¹¤Í¡£¡Ê¤À¤È»×¤¦¡Ë
> ¤½¤ì¤Ç¡¢ALL¤Ç¤¹¤«¤é
> ¤¹¤Ù¤Æ¤Î¥í¥±¡¼¥ë¤ËÆüËܸìeuc¤ò³ä¤êÉÕ¤±¤ë ¤Ç¤¹¤Í¡£
> ¥í¥±¡¼¥ë¤È¤Ï¡¢¥­¡¼ÆþÎϤäɽ¼¨½ÐÎϤÎÉôʬ¤Î¤³¤È¤À¤È»×¤Ã¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¢
> Á´Á³°ã¤Ã¤Æ²ò¼á¤·¤Æ¤¤¤¿¤ê¡¦¡¦¡¦¡¦

¤³¤Î¤¢¤¿¤ê¤¬»²¹Í¤Ë¤Ê¤ë¤«¤Ê¡©

http://www-6.ibm.com/jp/developerworks/linux/linux_global.html

°úÍѤ¹¤ë¤È

LC_ALL      Á´¤Æ¤Î¥«¥Æ¥´¥ê¡¼¤òÀßÄê 
LC_CTYPE    ʸ»ú¤Ë´Ø¤¹¤ë¾ðÊó 
LC_COLLATE  ʸ»ú¤Î¾È¹ç½çÈ֤˴ؤ¹¤ë¾ðÊó 
LC_MONETARY ¶â³Û¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë´Ø¤¹¤ë¾ðÊó 
LC_NUMERIC  ¿ôÃÍ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë´Ø¤¹¤ë¾ðÊó 
LC_TIME     »þ´Ö¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë´Ø¤¹¤ë¾ðÊó 

¤È¤¤¤¦¤³¤È¤Ç¡¢NLS(Native Language Support)¤Îµ¡Ç½¤È¤·¤Æ¤Ï¡¢¤³¤ì¤é¤ò´Ä¶­
ÊÑ¿ô¤ÇÆÈΩ¤ËÍøÍѤǤ­¤ë(¥³¥Þ¥ó¥É¤Î¥á¥Ã¥»¡¼¥¸¤ÏÆüËܸì¤Ç½Ð¤¹¤±¤É¡¢¶â³Û¤Î
ɽ¼¨·Á¼°¤Ï±Ñ¹ñ¼°¤Ë¤·¤Æ¡¢Æü»þ¤Îɽ¼¨·Á¼°¤ÏÊƹñ¼°¤Ë¤¹¤ë¡¢Åù)¤±¤É¡¢LC_ALL 
¤ò»ØÄꤹ¤ë¤È¡¢¤½¤ì¤é¸ÄÊ̤ÎÀßÄê¤è¤ê¤â LC_ALL ¤ÎÃͤòÍ¥À褷¤Æ»ÈÍѤ¹¤ë¡¢¤Ã
¤ÆÏäǤ¹¡£

¤Á¤Ê¤ß¤Ë¡¢¾åµ­ LC_ALL ¤«¤é LC_TIME ¤Þ¤Ç¤Ï POSIX(¤À¤Ã¤¿¤«¡©)¤Î»ÅÍͤǡ¢
glibc-2.2 ·Ï¤Ç¤Ï¾åµ­¤Ë²Ã¤¨¤Æ LC_ADDRESS ¤È¤« LC_NAME¡¢LC_PAPER Åù¤Î 
ISO(¤À¤Ã¤¿¤«¡©) ¤Î³ÈÄ¥»ÅÍͤޤǥµ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£

# ¤Û¤È¤ó¤É°ÕÌ£¤Ê¤¤¤·Â¿Ê¬²¿¤â»È¤Ã¤Æ¤Ï¤¤¤Ê¤¤¤ó¤À¤±¤É¤Í(¶ì¾Ð) > ³ÈÄ¥Éôʬ

¤Ä¤¤¤Ç¤Ë½ñ¤¤¤È¤¯¤È¡¢³Æ¹ñ¸ì¤Î¥Õ¥©¥ó¥È¤ÎÄêµÁ¤¬ /usr/share/i18n/charmaps/ 
°Ê²¼¤Ë¤¢¤Ã¤Æ(ÆüËܸì¤À¤È EUC-JP.gz)¡¢

<U3041>     /xa4/xa1     HIRAGANA LETTER SMALL A
<U3042>     /xa4/xa2     HIRAGANA LETTER A
<U3043>     /xa4/xa3     HIRAGANA LETTER SMALL I
<U3044>     /xa4/xa4     HIRAGANA LETTER I
<U3045>     /xa4/xa5     HIRAGANA LETTER SMALL U

¤³¤¦¤¤¤¦´¶¤¸¤Ç¥Ç¡¼¥¿¤¬Ê¤ó¤Ç¤¤¤Þ¤¹¡£³Î¤«ºÇ½é¤Î U3041 ¤ÎÉôʬ¤¬ Unicode 
¤Ç¡¢/xa4/xa1 ¤¬ EUC ¤Î¡Ö¤¡¡×¤Îʸ»ú¥³¡¼¥É¤ò¼¨¤¹Âбþɽ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£

# ¤Á¤ã¤ó¤ÈÄ´¤Ù¤¿¤ï¤±¤Ç¤Ï¤Ê¤¤¤Î¤Ç±³¤«¤âÃΤì¤Ì¡£¡£

°ìÊý¡¢locale ¤ÎÄêµÁ¥Õ¥¡¥¤¥ë¤Ï /usr/share/i18n/locale/ ¤Ë¤¢¤Ã¤Æ(ÆüËܸì
¤À¤È ja_JP)¡¢¤³¤Ã¤Á¤Ï

jhira   <U3041>;<U3042>;<U3043>;<U3044>;<U3045>;<U3046>;<U3047>;<U3048>;/
        <U3049>;<U304A>;<U304B>;<U304C>;<U304D>;<U304E>;<U304F>;<U3050>;/
        <U3051>;<U3052>;<U3053>;<U3054>;<U3055>;<U3056>;<U3057>;<U3058>;/
        <U3059>;<U305A>;<U305B>;<U305C>;<U305D>;<U305E>;<U305F>;<U3060>;/
        <U3061>;<U3062>;<U3063>;<U3064>;<U3065>;<U3066>;<U3067>;<U3068>;/

¤³¤¦¤¤¤¦´¶¤¸¤Ç¡Öjhira(Ê¿²¾Ì¾)¤ËʬÎव¤ì¤ëʸ»ú¥³¡¼¥É¤Ï <U3041> ¤«¤é¤ÎÉô
ʬ¤À¤è¡×¤È¤¤¤¦É÷¤Ëµ­½Ò¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

°ìÊý¡¢Æü»þ¤Îµ­½Ò¤Î LC_TIME ¤ÎÉôʬ¤Ï

LC_TIME
abday   "<U65E5>";"<U6708>";"<U706B>";"<U6C34>";"<U6728>";"<U91D1>";"<U571F>"

day     "<U65E5><U66DC><U65E5>";"<U6708><U66DC><U65E5>";/
        "<U706B><U66DC><U65E5>";"<U6C34><U66DC><U65E5>";/
        "<U6728><U66DC><U65E5>";"<U91D1><U66DC><U65E5>";/
        "<U571F><U66DC><U65E5>"

¤Î¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢abday(û½Ì¤·¤¿ÍËÆü)¤È¤·¤Æ»È¤¦Ê¸»ú¤Ï <U65E5>,
<U6708>,, (Æü¡¢·î¡¢²Ð¡¢¿å¡¢¡¢)¡¢day(Ä̾ï¤ÎÍËÆü)¤È¤·¤Æ»È¤¦Ê¸»ú¤Ï 
<U65E5><U66DC><U65E5>(Æü ÍË Æü)¡¢<U6708><U66DC><U65E5>(·îÍËÆü)¡¢¤È¤¤¤¦
·Á¤ÇÅÐÏ¿¤µ¤ì¤Æ¤¤¤Þ¤¹¡£

¥á¥ó¥É¤¯¤µ¤¤¤±¤É¡¢¤³¤¦¤¤¤¦ÄêµÁ¤ò¤·¤Æ¤ª¤¤¤Æ¡¢¥×¥í¥°¥é¥à¤ÇÍËÆü¤òɽ¼¨¤µ¤»
¤ë¾ì¹ç¤â printf("%s", abday[0]); ¤È¸À¤¦´¶¤¸¤Ç»È¤¨¤Ð¡¢LC_TIME ¤ÎÀÚ¤êÂØ
¤¨¤À¤±¤ÇÀ¤³¦³Æ¹ñ¤Îɽ¼¨·Á¼°¤ËÂбþ¤Ç¤­¤ë¡¢¤È¤¤¤¦¤Î¤¬¥í¥±¡¼¥ë(¤È¤¤¤¦¤« 
NLS µ¡Ç½)¤ò»È¤¦°ÕÌ£¤Ç¤¹¤Í¡£

¤³¤ì¤é¤Î charmap(ʸ»ú¥³¡¼¥ÉÄêµÁ)¥Õ¥¡¥¤¥ë¤È locale(³Æ¸À¸ì¤Î½ñ¼°ÄêµÁ¥Õ¥¡
¥¤¥ë)¤«¤éµ¡³£²ÄÆɤʷÁ¤Î locale data ¤òºî¤ë¤Î¤¬ localedef ¤È¤¤¤¦¥³¥Þ¥ó
¥É¤Ç¤¹¡£Plamo ¤Ç¤Ï¼ê¤òÈ´¤¤¤ÆÆüËܸì¤Î locale data ¤·¤«ºî¤Ã¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢
¶½Ì£¤¢¤ë¿Í¤Ï³Æ¹ñ¸ì¤Î locale ¤òºî¤Ã¤Æ»î¤·¤Æ¤ß¤Æ¤¯¤À¤µ¤¤¡£

# ¤¦¡¼¤Ì¡¢¡¢localedef ¤Ã¤Æ man ¥Ú¡¼¥¸¤¬Ìµ¤¤¤Ê¤¡¡¢¡¢info ¥Õ¥¡¥¤¥ë¤·¤«ÍÑ
# °Õ¤µ¤ì¤Æ¤Ê¤¤¤ó¤À¤Ã¤±¡£¡£

¤Ê¤ª¡¢localedef ¤ÇºîÀ®¤µ¤ì¤ë locale data ¤Ï /usr/share/locale ¥Ç¥£¥ì¥¯
¥È¥ê°Ê²¼¤Î³Æ¹ñ¸ì¥Ç¥£¥ì¥¯¥È¥ê¤ËÇÛÃÖ¤·¤Þ¤¹¤¬¡¢

% ls -F /usr/share/locale/ja_JP.eucJP
LC_ADDRESS  LC_CTYPE           LC_MEASUREMENT  LC_MONETARY  LC_NUMERIC  LC_TELEPHONE  man/
LC_COLLATE  LC_IDENTIFICATION  LC_MESSAGES/    LC_NAME      LC_PAPER    LC_TIME

¤³¤Î¤¦¤Á LC_MESSAGES ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤Ã¤Æ¤¤¤Æ¡¢¤³¤³¤Ë¤Ï¤½¤ì¤¾¤ì¤Î¥¢
¥×¥ê¥±¡¼¥·¥ç¥ó¤¬ÍøÍѤ¹¤ë¥á¥Ã¥»¡¼¥¸¥«¥¿¥í¥°¤¬ÇÛÃÖ¤µ¤ì¤ë¤Î¤ÇÃí°Õ¤·¤Æ¤¯¤À
¤µ¤¤¡£

# Î㤨¤Ð de (¥É¥¤¥Ä¸ì)¤Î locale data ¤ÏÍÑ°Õ¤·¤Æ¤Ê¤¤¤±¤É¡¢fileutils ¤È
# ¤«¤Î¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤Ï¥Ñ¥Ã¥±¡¼¥¸¤È°ì½ï¤ËÆþ¤ë¤Î¤Ç¡¢setenv LANG de 
# ¤È¤«¤¹¤ë¤È¡¢¼«Á°¤Î¥á¥Ã¥»¡¼¥¸¥Õ¥¡¥¤¥ë¤ò»ý¤Ã¤Æ¤¤¤ë¥³¥Þ¥ó¥É¤Î½ÐÎϤÏ
# ¥É¥¤¥Ä¸ì¤Ë¤Ê¤ë¤±¤É¡¢¤½¤¦¤Ç¤Ê¤¤¤Î¤Ï±Ñ¸ì¤Î¤Þ¤Þ¤È¤¤¤¦¾õ¶·¤Ë¤Ê¤ê¤Þ¤¹¡£

--------
¤³¤¸¤Þ

Follow-Ups
[plamo:14779] Re: locale(Re: Re: JustSystem JustArks¡¡Æ°ºî¤Ë¤Ä¤¤¤Æ), naomijj
References
[plamo:14775] Re: JustSystem Just Arks¡¡Æ°ºî¤Ë¤Ä¤¤¤Æ, Takashi Yamashita
[plamo:14776] Re: JustSystem Just Arks¡¡Æ°ºî¤Ë¤Ä¤¤¤Æ, naomijj

[¸¡º÷¥Ú¡¼¥¸] [¥á¡¼¥ë°ìÍ÷]
Plamo ML ¸ø³«¥·¥¹¥Æ¥à