[lug] RH8: adding new language support

rm at fabula.de rm at fabula.de
Wed Feb 25 16:23:31 MST 2004


On Wed, Feb 25, 2004 at 04:53:02PM -0500, Nancy Perry wrote:
> I am going nuts and hoped someone could help.
> 
> I have a RH8 system on which I originally thought I would
> only need English language support on (my first mistake).

Hi Nancy,

i'm njot an RH user at all, so i can't really comment on the
proper scripts to invoke to change some of the system defaults.
But read on ...

> Now I need to add support for storing German characters
> (umlauts, specifically) and I can't figure out how to add
> this new language support without a completely new install.
> The RH documentation suggests I can do so using the command
> 'redhat-config-language' but that only offers me English as
> an option. I can SEE the files I want to install in
> /usr/share/i18n/locales/de_DE* but I can't figure out how
> to get them installed into the /usr/lib/locale/ dir.

There should be a file '/etc/locale.gen' -- edit it (by uncommenting
the locales you need, ISO-8859-1  and/or ISO-8859-15 for german) and
run 'locale-gen' (_should_ be /usr/sbin/locale.gen). AFAIK this is
part of glibc.

> I have tried 'unsetenv LANG' and tried to install using localedef
> but no luck.  Basically all I want to do is a 'wget' on a few web pages
> with umlauts on them and have the page content preserved correctly
> on my disk.
> 
>   [example: Abfullmaschinen (where the 'u' has the umlaut dots above)
>   is stored as Abfüllmaschinen, then is displayed using the two
>   incorrect characters \xc3 and \xbc and not single \xfc which is
>   the correct character for the small umlautted-u]

Hmmmm, 
i don't think this has anything to do with your locale settings at all.
Wget just fetches the web resource and dumps it byte by byte to the 
filesystem. From you example it looks like the webpage uses some sort
of unicode encoding (most likely utf-8, an encoding where the lower
part of the encoding vector happens to be the same as ASCII but characters
like u-Umlaut are stored as two octets). Have a look at the html/xhtml
header.
BTW, even with the proper locale settings you need to tell some tools that
you really want fancy encodings. One example would be 'less' (often used
as a pager by other apps like 'man' or 'psql') that will show those silly 
\xfc -- just do:

export LESSCHARSET=latin1 

(probably in your bashrc) and you'll get nice a/o/u-mlauts ...

 HTH

   Ralf Mattes
> Can anyone point me to documentation/hints on how to add support
> for new languages once my install is done?
> 
> Thanks for any pointers!
> Nancy
> 
> 
> p.s. locales currently in /usr/lib/locale (whatever I got on my
> original "English only please" install) are:
> 
> en_AU/       en_DK.utf8/       en_IE.utf8/       en_PH.utf8/       en_ZA.utf8/
> en_AU.utf8/  en_GB/            en_IE.utf8 at euro/  en_SG/            en_ZW/
> en_BW/       en_GB.iso885915/  en_IE at euro/       en_SG.utf8/       en_ZW.utf8/
> en_BW.utf8/  en_GB.utf8/       en_IN/            en_US/
> en_CA/       en_HK/            en_NZ/            en_US.iso885915/
> en_CA.utf8/  en_HK.utf8/       en_NZ.utf8/       en_US.utf8/
> en_DK/       en_IE/            en_PH/            en_ZA/
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug
> Join us on IRC: lug.boulder.co.us portf67 channel=#colug



More information about the LUG mailing list