Sebastian Plotz wrote:
> I'm note sure, but I think that the LANG variable influences the 
> encoding of the output.

Only if the program has been translated into the language and character
set that you set in $LANG.  If not, it has no effect.  gettext is not
magic; it just provides an alternate byte sequence (if available) based
on the byte sequence that the original program sends it.  :-)

(Er, I think.  It might actually be full-Unicode-aware, but I'm pretty
sure everything is done in utf8 directly.  wchar_t is neither necessary
nor sufficient actually: if your program knows the difference between
bytes and characters and printed units (yes, all three are different),
then you can leave everything in UTF-8 internally, and just use char.
And converting everything to a wchar_t requires a source encoding; the
program doesn't necessarily know that.)

> So we should enable unicode mode if we're using de_DE.UTF-8 and for
> de...@euro we should leave the unicode mode disabled (and -m 8859-15
> needs to be specified).

Depends on the program, the presence (or absence) of gettext .mo files
under /usr/share/locale, and whether the program uses iconv directly.
(Which is another way to convert between character encodings.)

> I think Ubuntu uses the unicode mode and sets the LANG variable to
> de_DE.UTF-8 (in a german installation).

Lots of distros do.  Doesn't mean they get it right for all cases, and
X is *definitely* a lot easier to handle than the console.

I wish Alexander was still around; he knew a lot more about language
issues than most of us.  Mostly because he could read Cyrillic, I
believe.  :-)

However, his utf8 tests are still in the archives:

http://linuxfromscratch.org/pipermail/lfs-dev/2006-January/055392.html
http://linuxfromscratch.org/pipermail/lfs-dev/2006-January/055393.html
http://linuxfromscratch.org/pipermail/lfs-dev/2006-January/055394.html
http://linuxfromscratch.org/pipermail/lfs-dev/2006-January/055425.html

Many of the items in those messages are irrelevant now, since we've
removed the pieces that they proved were necessary at the time.  But
running the tests is still a good idea.

Attachment: signature.asc
Description: OpenPGP digital signature

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to