Fwd: Lynx and locales (Archaic: please read)

Archaic archaic at linuxfromscratch.org
Sat Dec 31 07:57:44 PST 2005

To anyone who has a working uClibc system currently available, please
try the tests below and send the report to blfs-dev.


----- Forwarded message from "Alexander E. Patrakov" <alexander at linuxfromscratch.org> -----

To: BLFS Development List <blfs-dev at linuxfromscratch.org>
From: "Alexander E. Patrakov" <alexander at linuxfromscratch.org>
Date: Sat, 31 Dec 2005 11:21:29 +0500
User-Agent: Debian Thunderbird 1.0.2 (X11/20051002)
Subject: Lynx and locales (Archaic: please read)


the current Lynx installation instructions produce Lynx that needs some 
configuration in order to be able to display web pages correctly in 
non-ISO-8859-1 locales. The configuration is simple: find the 
'#CHARACTER_SET:iso-8859-1' line in /etc/lynx.cfg, uncomment and insert 
the correct character set. Or just

echo 'CHARACTER_SET:'`locale charmap` >>/etc/lynx.cfg

While this certainly works, I prefer (and actually implement on the 
LiveCD) another method because the method above would require LiveCD 
users to reconfigure Lynx. The preferred method is:

1) Add the --enable-locale-charset parameter to the ./configure 
arguments. This is experimental, but lynx developers explain in lynx.cfg 
that it works with glibc. So I read it as "experimental for non-glibc 

2) sed -i 's/#LOCALE_CHARSET:FALSE/LOCALE_CHARSET:TRUE/' /etc/lynx.cfg

Then, Lynx will assume that the display character set is the same as 
locale charset, and convert web pages to the locale cherecter set.

While this works for glibc, I think we shouldn't implement this until 
Archaic says OK for uClibc-based HLFS. Attached are screenshots for 
Google in some languages, as displayed by linux text console 
(alternatively, by "LANG=... xterm -lc" but please tell if you do this), 
to be used by Archaic as testcases. Please verify that all non-ASCII 
characters look right.


In /etc/sysconfig/console:
FONT="lat2-16 -m 8859-2"

In /etc/profile or /etc/profile.d/i18n:
LANG=pl_PL.ISO-8859-2 # or just pl_PL

URL: http://www.google.pl/intl/pl/


In /etc/sysconfig/console:
FONT="cyr-sun16 -m koi8-r"

In /etc/profile or /etc/profile.d/i18n:

URL: http://www.google.ru/intl/ru/

As for UTF-8 locales, Lynx supports them in some degree when compiled 
from the UTF-8 enabled LFS with the --with-screen=ncursesw configure 
switch. Remaining problems:

1) The edit field assumes that "bytes" and "characters" are the same 
thing. This leads to incorrect cursor positioning after pressing 
Backspace over a non-ASCII character. Not as bad as with MC.

2) If the --enable-nls switch is passed to ./configure, translated 
messages are cut off after 80 bytes, not 80 characters. See 
ru-utf8-bad.png for an example: look at the third line at the bottom, 
compare with ru.png. This can be "solved" by writing something similar 
to the Texinfo patch used in UTF-8 LFS and disabling translated messages 
in multibyte locales at runtime. But better, I'll report this upstream.

Alexander E. Patrakov
Don't mail to patrakov at ums.usu.ru: the server is off until 2006-01-11
Use my GMail or linuxfromscratch address instead

FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

----- End forwarded message -----


Want control, education, and security from your operating system?
Hardened Linux From Scratch

More information about the hlfs-dev mailing list