Armadilloフォーラム

armadilloのロケールについて

hondah

2016年9月26日 20時04分

いつもお世話になっております。

Armadilloでcursesを使用したいと考えているのですが、ロケールが設定できておらず困っております。

Armadilloでロケールja_JP.SJISを利用することは可能でしょうか。
可能であればその手順を教えていただけないでしょうか。

以上、よろしくお願いいたします。

コメント

at_takashi.sasayama

2016年9月28日 15時51分

笹山です。

> Armadilloでロケールja_JP.SJISを利用することは可能でしょうか。
> 可能であればその手順を教えていただけないでしょうか。

以下の手順でロケールを ja_JP.sjis に変更できることを確認しています。
本手順で作成される環境で動作確認を行ってみていただけないでしょうか?

■ 手順1: ATDE5 での作業

atmark-dist には locale コマンドは含まれていませんので、
Debian wheezy 版のものを使用します。必要となるパッケージは以下の2つです。

https://packages.debian.org/wheezy/libc-bin
https://packages.debian.org/wheezy/locales

以下の手順でユーザーランドイメージに組み込みを行います。

[ATDE5]$ cd ~/atmark-dist
[ATDE5]$ make
 
[ATDE5]$ wget http://security.debian.org/debian-security/pool/updates/main/e/eglibc/libc-bin_2.13-38+deb7u11_armhf.deb
[ATDE5]$ wget http://security.debian.org/debian-security/pool/updates/main/e/eglibc/locales_2.13-38+deb7u11_all.deb
 
[ATDE5]$ dpkg-deb -x libc-bin_2.13-38+deb7u11_armhf.deb romfs/
[ATDE5]$ dpkg-deb -x locales_2.13-38+deb7u11_all.deb romfs/
 
[ATDE5]$ make image

※ make, make clean を実行すると、ユーザーランドに展開された locale 関係のファイルは
全て消えてしまいますので、都度展開を行ってください。

■ 手順2: Armadillo での作業

作成されたイメージで起動し localdef コマンドを実行し ja_JP.sjis を追加後、
ロケールを ja_JP.sjis に変更します。

[Armadillo]# localedef -f SHIFT_JIS -i ja_JP ja_JP.SJIS
 
[Armadillo]# locale -a
C
C.UTF-8
POSIX
ja_JP.sjis
 
[Armadillo]# export LANG=ja_JP.sjis
 
[Armadillo]# locale
LANG=ja_JP.sjis
LANGUAGE=
LC_CTYPE="ja_JP.sjis"
LC_NUMERIC="ja_JP.sjis"
LC_TIME="ja_JP.sjis"
LC_COLLATE="ja_JP.sjis"
LC_MONETARY="ja_JP.sjis"
LC_MESSAGES="ja_JP.sjis"
LC_PAPER="ja_JP.sjis"
LC_NAME="ja_JP.sjis"
LC_ADDRESS="ja_JP.sjis"
LC_TELEPHONE="ja_JP.sjis"
LC_MEASUREMENT="ja_JP.sjis"
LC_IDENTIFICATION="ja_JP.sjis"
LC_ALL=

hondah

2017年6月1日 19時55分

ご連絡遅くなってしまい申し訳ございません。

頂いた手順で実施したところromfs.imgのサイズが61MBになってしまった為、起動できませんでした。
現在は、/usr/share/i18nのみを外部ストレージへ保存し、シンボリックリンクさせております。

localededefにてsjisを定義しようとすると下記の通りです。

「root@armadillo440-0 (ttymxc1) /usr/share/locale]# localedef -f SHIFT_JIS -i ja_JP ja_JP.SJIS -v
character map `SHIFT_JIS' is not ASCII compatible, locale not ISO C compliant
/usr/share/i18n/locales/ja_JP:11: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:12: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:15: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:18: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:19: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:20: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:21: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:23: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:24: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:25: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:26: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:27: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:28: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:29: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:30: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:31: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:32: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:33: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:42: non-symbolic character value should not be used
/usr/share/i18n/locales/i18n:1425: non-symbolic character value should not be used
/usr/share/i18n/locales/i18n:1674: non-symbolic character value should not be used
/usr/share/i18n/locales/i18n:1719: non-symbolic character value should not be used
/usr/share/i18n/locales/i18n:1756: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:1675: non-symbolic character value should not be used
/usr/share/i18n/locales/ja_JP:1676: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:10: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:11: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:12: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:13: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:14: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:15: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:16: non-symbolic character value should not be used
/usr/share/i18n/locales/translit_neutral:17: non-symbolic character value should not be used
LC_ADDRESS: field `country_name' not defined
LC_ADDRESS: field `country_post' not defined
LC_ADDRESS: field `country_car' not defined
LC_ADDRESS: field `country_isbn' not defined
LC_ADDRESS: field `lang_name' not defined
LC_ADDRESS: field `lang_term' not defined
LC_ADDRESS: field `lang_ab' not defined
LC_TELEPHONE: field `int_select' not defined
LC_IDENTIFICATION: no identification for category `LC_MEASUREMENT'
no output file produced because warnings were issued
[root@armadillo440-0 (ttymxc1) /usr/share/locale]#