[Angstrom-devel] Using a UTF- 8 locale in Ångström

Jeroen Hoek mail at jeroenhoek.nl
Wed May 23 12:26:36 CEST 2007


Hello White Bear,

A late reply, but this may be of use to others as well (yes, I will put
this in the wiki if these instructions are okay).

I have Ångström working with UTF-8 locales now. (English, Dutch,
Japanese and Korean):

Install these for a start (for the locales you want, but Japanese as an
example):

  // Needed for localedef
  glibc-localedata-en-gb
  // Japanese
  glibc-binary-localedata-ja-jp
  glibc-locale-ja
  glibc-localedata-ja-jp
  libglib-2.0-locale-ja
  locale-base-ja-jp

Then get localedef:

  glibc-utils

Make sure the device has enough swap space, because localedef takes some
memory. If that is not an option, perhaps it is better to convert the
locales on a more powerful machine. My Zaurus 3200 managed with swap.

Do this for all locales you use:

  localedef -c -i en_GB -f UTF-8 en_GB.utf8
  localedef -c -i ja_JP -f UTF-8 ja_JP.utf8

Mind the use "utf8" instead of "UTF-8" for the locale name!

Then setup the environment variables in (for
example) /etc/profile.d/locale:

------------------------ Cut here ----------------------------
# Set global locales:

LC_ALL="en_GB.utf8"
LANG="en_GB.utf8"
------------------------ End file ----------------------------

Reboot to make sure these variables are used everywhere, test with
"locale -a".

I used a small UTF-8 text file with Japanese in it to test gpe-edit and
the Japanese fonts. If that works, UTF-8 should be working. After that,
set the LC and LANG vars to what you want. Wether or not applications
are in Japanese depends on the available translations of course.

Hope this helps. Gnumeric on my Z happily displays Korean and Japanese
imported from an UTF-8 text file. Gpe-conf works too, as does gpe-edit.
If I remember correctly, one reason why GTK2 might not work in your case
could be the use "UTF-8" instead of "utf8" for the localenames. I ran
into that problem on my Gentoo desktop some time ago.

Kind regards,

Jeroen Hoek

On Mon, 2007-04-23 at 14:02 +0200, 白い熊 wrote:
> It seems that the problems with ja_JP.UTF-8 are somehow associated with GTK,
> though the form eludes.
> 
> The glibc locale works, I can start rxvt and emacs in this locale and no
> errors all the messages are in Japanese.
> 
> It seems GTK apps freeze though, thus gpe-conf never comes up, left it running
> for two hours, the window doesn't appear, though no errors are posted.
> Similarly uim-toolbar doesn't come up.
> 
> Why does X emacs come up though when its interface is also GTK, but it works
> with the locale? I can't seem to determine what could be the problem...
> 
> Anyone? Any pointers?
> 
> Thank you.
> 
> Best regards,
> 
> ShiroiKuma
> 
> _______________________________________________
> Angstrom-distro-devel mailing list
> Angstrom-distro-devel at linuxtogo.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel
> 
> 




More information about the Angstrom-distro-devel mailing list