[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-users:46381] Re: Manpage encoding: UTF-8 or EUC-JP?
ã“ã‚“ã«ã¡ã¯ï¼Œ
> > > DocBook/XML ã§æ›¸ã‹ã‚ŒãŸãƒ‰ã‚ュメントã‹ã‚‰æ—¥æœ¬èªž manpage ã‚’åãã€
> > > Aptitude ã® manpage 生æˆç³»ã‚’ã„ã˜ã£ã¦ã„ã¾ã™ã€‚
> > > 変æ›è‡ªä½“ã¯å‡ºåŠ›ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒ UTF-8 ã§ã‚‚ EUC-JP ã§ã‚‚ã†ã¾ãã„ãã®ã§ã™ãŒã€
> > > 自分ã®ç’°å¢ƒ (sarge) ã§ã¯ã€ãƒã‚±ãƒ¼ãƒ«ãŒ ja_JP.EUC-JP ã§ã‚‚ ja_JP.UTF-8 ã§ã‚‚
> > > UTF-8 ã® manpage ã¯ã†ã¾ã表示ã•ã‚Œã¾ã›ã‚“。
> >
> > man -Tnippon -l XXXX.X.X
> > man -Tutf8 -l XXXX.X.X
> > ã‚ãŸã‚Šã§ç¢ºèªã—ã¦ã¿ã‚‹ã¨ã©ã†ã§ã™ã‹ï¼Ÿ
>
> ã™ã¿ã¾ã›ã‚“。ã¡ã‚‡ã£ã¨ç¢ºèªæ–¹æ³•ãŒã¾ãšãã€
> ãƒã‚±ãƒ¼ãƒ«ãŒ ja_JP.UTF-8 ã®å ´åˆã¯ã†ã¾ã表示ã•ã‚Œã‚‹ã“ã¨ãŒã‚ã‹ã‚Šã¾ã—ãŸã€‚
> ä»–æ–¹ã§ã€EUC-JP 環境ã«ãŠã„ã¦ã¯ã†ã¾ã表示ã§ãã¾ã›ã‚“。
> 次ã®ã‚ˆã†ã«ã€ä¸Šå·ã•ã‚“ã«æ案ã•ã‚ŒãŸã‚ªãƒ—ションをã¤ã‘ã¦ã¿ã¦ã‚‚ã€
> çµæžœã«å¤‰åŒ–ã¯ãªã„よã†ã§ã™ã€‚
>
> * LANG=ja_JP.EUC-JP → æ–‡å—化ã‘
> * LANG=ja_JP.EUC-JP + -Tnippon → æ–‡å—化ã‘
> * LANG=ja_JP.EUC-JP + -Tutf8 → æ–‡å—化ã‘
> * LANG=ja_JP.UTF-8 → UTF-8 ã§å‡ºåŠ›
ã“れ,手もã¨ã§æ–‡å—化ã‘ã—ã¾ã—ãŸï¼Žæ£ç¢ºãªã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã¯ã©ã†ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ
> * LANG=ja_JP.UTF-8 + -Tnippon → UTF-8 ã§å‡ºåŠ›
> * LANG=ja_JP.UTF-8 + -Tutf8 → UTF-8 ã§å‡ºåŠ›
>
> ……ã¨ã„ã†ã“ã¨ã¯ã€manpage ã®ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ãŒ UTF-8 ã®å ´åˆã€
> ã¨ã‚Šã‚ãˆãšãƒã‚±ãƒ¼ãƒ«ãŒ ja_JP.UTF-8 ã®å ´åˆã¯è¡¨ç¤ºã§ãるよã†ã§ã™ã。
> Aptitude ã® manpage ã«é–¢ã—ã¦ã¯ä»–言語ã¨åŒæ§˜ UTF-8 ã§ã„ã“ã†ã¨æ€ã„ã¾ã™ã€‚
> ã—ã‹ã—ä»–æ–¹ã§ã€
> ja_JP.EUC-JP ã®å ´åˆã«è¡¨ç¤ºã§ããªã„ã®ã¯ã‚„ã¯ã‚Šå•é¡Œã®ã‚ˆã†ãªæ°—ã‚‚ã—ã¾ã™ã€‚
man-db ã® 2.4.0-1 ã® changelog ã¨ã‹ï¼Œ
src/encodings.c を見ã¦ã„ã‚‹ã¨ï¼š
1. ã©ã‚“ãªlocaleã§ã‚ã£ã¦ã‚‚, jaã®å ´åˆã¯ï¼ŒEUC-JP ãŒã‚½ãƒ¼ã‚¹ã‚¨ãƒ³ã‚³ãƒ¼ãƒ‡ã‚£ãƒ³ã‚°ã§
ã‚ã‚‹ã“ã¨ã‚’å‰æã¨ã—ã¦ã„る.
directory_entry:
{ "ja", "EUC-JP", "EUC-JP" }, /* Japanese */
2. UTF-8 manpage ã‚’ãŠãã®ã§ã‚ã‚Œã°ï¼Œ/usr/share/man/ja_JP.UTF-8/manX
(ピリオドãŒã‚り,ãã®å¾Œã«charsetæƒ…å ±ãŒã¤ã„ã¦ã„ã‚‹å ´åˆã¯ special-case ã—ã¦ã„ã‚‹)
char *get_page_encoding (const char *lang)
(snip)
dot = strchr (lang, '.');
if (dot)
return xstrndup (dot + 1, strcspn (dot + 1, ",@"));
ã¨ã„ã†ã“ã¨ãŒã‚ã‹ã‚Šã¾ã—ãŸï¼Žã“ã†ãªã£ã¦ã„ãªã‹ã£ãŸã‚‰ãŠãらããƒã‚°ã§ã™ï¼Ž
ソースä¸ã®ã‚³ãƒ¡ãƒ³ãƒˆã§ä¾‹ã¨ã—ã¦ä¸‹è¨˜ãŒæ›¸ã„ã¦ã‚ã‚Šã¾ã™ï¼š
* /usr/share/man/ja_JP.EUC-JP, locale ja_JP.UTF-8
* page encoding = EUC-JP
* source encoding = EUC-JP
* roff encoding = UTF-8
* output encoding = UTF-8
* EUC-JP -> iconv -> UTF-8 -> groff -Tutf8 -> UTF-8
上å·
--
dancer@{debian.org,netfort.gr.jp} Debian Project