[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[debian-devel:15361] Re: bash の初期化がおかしい
- From: Fumitoshi UKAI <ukai@debian.or.jp>
- Subject: [debian-devel:15361] Re: bash の初期化がおかしい
- Date: Tue, 29 Oct 2002 01:27:23 +0900
- List-help: <mailto:debian-devel-ctl@debian.or.jp?body=help>
- List-id: debian-devel.debian.or.jp
- List-owner: <mailto:debian-devel-admin@debian.or.jp>
- List-post: <mailto:debian-devel@debian.or.jp>
- List-software: fml [fml 4.0.3 release (20011202/4.0.3)]
- List-unsubscribe: <mailto:debian-devel-ctl@debian.or.jp?body=unsubscribe>
- Organization: Debian JP Project
- X-ml-info: If you have a question, send e-mail with the body "help" (without quotes) to the address debian-devel-ctl@debian.or.jp; help=<mailto:debian-devel-ctl@debian.or.jp?body=help>
- X-ml-name: debian-devel
- X-mlserver: fml [fml 4.0.3 release (20011202/4.0.3)]; post only (only members can post)
- X-spam-level:
- X-spam-status: No, hits=0.8 required=10.0 tests=IN_REP_TO,ISO2022JP_CHARSET,ISO2022JP_BODY,CASHCASHCASH, DOUBLE_CAPSWORD,EIGHTBIT_BODY,WEIRD_PORT,UNIFIED_PATCH version=2.31
- References: <200210280652.g9S6qTw20549@xxxxxxxxxxxxxxxx> <87smyqq5vy.wl@xxxxxxxxxxxxxxxx> <r0k7kg2d2y3.fsf@xxxxxxxxxxxxxxxxx>
- Message-id: <87smyq8r6d.wl@xxxxxxxxxxxxxxxx>
- X-mail-count: 15361
- User-agent: Wanderlust/2.8.1 (Something) SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (Kashiharajing-mae) APEL/10.4 Emacs/21.2 (i386-pc-linux-gnu) MULE/5.0 (SAKAKI)
At Mon, 28 Oct 2002 23:59:36 +0900,
Satoshi Koike wrote:
> >>>>> In [debian-devel : No.15359]
> >>>>> ukai@debian.or.jp (Fumitoshi UKAI) wrote:
> > ざっとソースをながめただけですが ここで(1)が解決しないというのは
> > locale.c:set_lang() で setlocale() したら textdomain(3)、bindtextdomain(3)
> > もするようにしたら治りませんか?
>
> この辺の関数の使い方がよく分からないので、とりあえず、textdomain(NULL)
> と bindtextdomain(NULL, NULL) を足してみたのですが、変化ありませんでし
> た。
メッセージがおかしくなるのは、これでなおりそうです
# が、これは libc のバグのような気がする…
--- bash-2.05b.orig/locale.c 2002-05-17 04:31:43.000000000 +0900
+++ bash-2.05b/locale.c 2002-10-29 00:46:29.000000000 +0900
@@ -25,6 +25,7 @@
#if defined (HAVE_UNISTD_H)
# include <unistd.h>
#endif
+#include <langinfo.h>
#include "bashintl.h"
#include "bashansi.h"
@@ -190,7 +191,19 @@
set_lang (var, value)
char *var, *value;
{
- return ((lc_all == 0 || *lc_all == 0) ? setlocale (LC_ALL, value?value:"") != NULL : 0);
+ int r = 0;
+ if ((lc_all == 0 || *lc_all == 0)) {
+ extern const char _libc_intl_domainname[];
+ r = setlocale (LC_ALL, value?value:"") != NULL;
+#if 0
+ textdomain (default_domain ? default_domain : _libc_intl_domainname);
+ bindtextdomain(default_domain ? default_domain : _libc_intl_domainname,
+ default_dir ? default_dir : "/usr/share/locale");
+#endif
+ bind_textdomain_codeset(default_domain ? default_domain : _libc_intl_domainname,
+ nl_langinfo(CODESET));
+ }
+ return r;
}
/* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE) */
それから LANG=ja_JP.eucJP などと設定しなおしても
(2)マルチバイト/マルチカラム文字の編集機能はだめな(というかそもそも入力
できない)ような…
--
鵜飼文敏