Opened 20 years ago

Closed 19 years ago

Last modified 10 years ago

#909 closed defect (fixed)

i18n incomplete in BLFS

Reported by: alexander@… Owned by: blfs-book@…
Priority: highest Milestone:
Component: BOOK Version: SVN
Severity: normal Keywords:
Cc:

Description

1) The new glibc in new LFS now installs all UTF-8 locales. That's bad for users who use Gnome Display Manager since it chooses UTF-8 locales by default if they are available, and (B)LFS is broken (wontfix) in such locales. Make GDM choose the well-supported non-UTF locales by default by editing the /etc/gnome/gdm/locale.alias file

2) LFS currently installs vim with the language files, BLFS doesn't. This must be fixed.

3) When installing X for users in non-iso8859-1 locales, the /etc/X11R6/lib/X11/fonts/misc/fonts.alias file must be edited manually in order to ensure that the fonts with the correct encoding are used for "fixed", "variable", "10x20" and similar aliases.

4) When installing Glib2, one more evnironment varlable should be added to /etc/profile.d/i18n.sh

G_FILENAME_ENCODING=@locale

Otherwise Glib will think that filenames are in UTF-8. The "ls" binary from coreutils always thinks that filenames are in the default locale encoding, not in UTF-8, and I (as opposed to glib developers) think that "ls" is right.

Change History (17)

comment:1 by igor@…, 20 years ago

Fixed 2) and 4).

comment:2 by alexander@…, 20 years ago

Item (4) verified.

Item (2) has a confusing wording. The reader might think that the language pack must be unpacked from within the vim63 directory. In fact both tarballs must be unpacked into the same directory. If we ignore this confusing wording, (2) is verified.

For (1), the following sed looks reasonable:

sed -i -e 's/\t[,\t]*,/\t/' -e 's/ru_RU/ru_RU.KOI8-R/' locale.alias

It just drops the first locale (which happens to be UTF-8) from the list, and corrects the setting for Russia. Similar corrections for countries where the character set must be explicitly specified should also be appended - but that's beyond my knowledge. Will look into Debian package and post additional notes if this helps.

For (3), strategies are different for cyrillic and non-cyrillic languages.

For cyrillic ones, it is sufficient to put the following line into the top of the "Files" section in xorg.conf, this directory already contains the needed bitmap fonts and their aliases:

FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/"

For locales using iso-8859-X where X != 1, the following sed looks reasonable but must be verified:

sed -i 's,iso8859-1\( \|$\),iso8859-X\1,g' fonts.alias

(must be applied to fonts.alias in "misc", "100dpi" and "75dpi" font directories).

New item:

(5) Add a new page telling the reader to install additional TrueType fonts (e.g. FreeFont and the Microsoft ones). This is needed because the fonts supplied with X cover only a very small subset of Unicode (in fact, only ISO-8859-{1,2}). They are even harmful because programs tend to pick them up and as a result cannot display ANY characters, even English ones.

comment:3 by igor@…, 20 years ago

Fixed 3) and 5)

comment:4 by alexander@…, 20 years ago

(3) looks OK for non-Cyrillic users. (5) reopened: it is not possible to download freefont from the official site. I suggest unpacking the "ttf-freefont" Debian package.

comment:5 by alexander@…, 20 years ago

One more location for freefont: ftp://ftp.gnu.org/savannah/files/freefont/

comment:6 by igor@…, 20 years ago

Fixed 3) for Cyrillic users.

5) I think users can figure out that much as there is a link to the Debian package on the web site.

comment:7 by igor@…, 20 years ago

Ok, I'm going to put that link into the book.

comment:8 by alexander@…, 20 years ago

For (3), I'd rather reorder sentences, as follows, in order to put the goal to the top. ====================== Users not using ISO-8859-1 based locales have to make a few adjustments to their font settings in order to make sure that fonts with the correct encoding are used for "fixed", "variable", "10x20" and similar aliases. For cyrillic alphabet, ......... ====================== And there is a typo: there is no ISO-8858-X locales

comment:9 by igor@…, 20 years ago

Done.

comment:10 by alexander@…, 20 years ago

(5) good. (3) still not satisfactory. A Cyrillic user will read: "make sure...", then see the sed and ask "what should I put in this sed?". The correct answer is that this sed is not needed. Please state clearly that the sed applies to ISO-8859-X based locales only. Also please change "xorg.conf" to "XF86Config or xorg.conf" as it is done everywhere above on this page. And, in the "Setting up keyboards" section above, could you please remove the words "it has been reported that"?

comment:11 by igor@…, 20 years ago

Done.

comment:12 by alexander@…, 20 years ago

Again wrong. Both Cyrillic and non-Cyrillic users need to make sure that fonts with the correct encoding are used for "fixed", "variable", "10x20" and similar aliases. Cyrillic users do that by putting an extra line to the top of the "Files" section. Non-cyrillic ISO-8859-X (X!=1) users do that by the sed. Defaults are correct for ISO-8859-1.

comment:13 by alexander@…, 20 years ago

Proposed text: ========================= Users of character sets other than ISO-8859-1 have to make a few adjustments to their font settings in order to make sure that fonts with the correct encoding are used for "fixed", "variable", "10x20" and similar aliases. For Cyrillic alphabet, it is sufficient to put the following line into the top of the "Files" section in xorg.conf or XF86Config because this directory already contains the needed bitmap fonts and their aliases: FontPath "/usr/X11R6/lib/X11/fonts/cyrillic/" For ISO-8859-[X] based locales, use the following command instead: sed -i 's,iso8859-1\( \|$\),iso8859-[X]\1,g' \

/usr/X11R6/lib/X11/fonts/{75dpi,100dpi,misc}/fonts.alias

comment:14 by igor@…, 20 years ago

Done, thanks.

comment:15 by Randy McMurchy, 19 years ago

I would sure like to close out this bug. Here's the last that has been said about it: http://linuxfromscratch.org/pipermail/blfs-dev/2004-December/008256.html

Choices are to patch the huge GDM locale.alias file or ignore the issue.

I vote for ignore. :-)

comment:16 by bdubbs@…, 19 years ago

Resolution: fixed
Status: newclosed

It looks like most issues are resolved in this bug. The remaining one concerning the gdm locale.alias file can be deferred until someone gives us a patch.

comment:17 by bdubbs@…, 10 years ago

Milestone: old

Milestone old deleted

Note: See TracTickets for help on using tickets.