locales, nls - supportable or not?
Alexander E. Patrakov
patrakov at ums.usu.ru
Tue Nov 14 20:55:01 PST 2006
there was a thread on blfs-support that really made me think that all my
efforts of adding locale support to the book were in vain. See
The problem is that the wrong answer is given to the original poster by
TWO editors, and nobody corrected them. On this basis, I declare that
locale issues are not really supportable (and DIY is right in ignoring
them), and demand immediate removal of all UTF-8 related patches and
instructions from LFS and BLFS (and putting back the words like "UTF-8
does not work and requires substantial undocumented modifications to the
build process"). It is better to be honest and don't claim non-existent
Now, the correct answer to the thread mentioned above.
> nls_utf8 doesn't seem to be used, but I don't know it this right
This isn't right. The problem is that the iocharset absolutely needs to
match the locale. You have to use iocharset=utf8. This is documented in
the book, on the fstab page: "Filesystems with MS-DOS or Windows origin
(i.e.: vfat, ntfs, smbfs, cifs, iso9660, udf) need the iocharset mount
option in order for non-ASCII characters in file names to be interpreted
properly. The value of this option should be the same as the character
set of your locale, adjusted in such a way that the kernel understands it."
> And last thing: the characters used to make squares in ncurses.
> Configuring the kernel, for example. make menuconfig gives garbage in
> the console, but looks nice under X, with an ext3 filesystem.
Incorrect contents of /etc/sysconfig/console. Please use:
FONT="LatArCyrHeb-16" # or "lat0-16"
This will (contrary to what Dan Nicholson states) give you the correct
input and display of all characters used in Spanish both in the console
and in xterm. You can also download LFS LiveCD and see the result
yourself by default (but, of course, you have to mount vfat with
iocharset=utf8 yourself, the CD can't automagically add this option).
And Japanese on the console is not possible without software like iterm
(but even then, only output, not input, is possible). For Japanese in X,
> Only one question: how do you set utf-8 for X and, say, iso-8859-15
> for console?
You don't - this is an inherently broken setup. If you do this, in the
console you won't be able able to read documents that were created in X,
and the other way round. You want es_ES.UTF-8 in both places. And the
latest kernel even doesn't need patches for this to work (but that's
only because your keymap doesn't produce characters outside of Latin-1
using dead keys).
Alexander E. Patrakov
More information about the blfs-dev