Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Echoing of 8-bit-characters broken after 4.3.2?



On 2009-02-28 at 23:00 +0100, Wolfgang Hukriede wrote:
> Andrey wrote:
> > Because this is established standard to define your character set
> > properties. Without it applications should assume C (or POSIX) locale
> > that basically corresponds to standard ASCII.
> 
> Should the character set properties not be set by LC_CTYPE? As far as
> I can tell LANG sets more than that? Do I understand correctly that
> LANG is zsh-specific? (On my box, man 3 setlocale does not have it.)

LANG is not zsh-specific.

LANG sets defaults, the LC_* settings override those and LC_ALL
overrides everything, if memory serves.

On FreeBSD, running "locale" on its own reports all the relevant
variables, including LANG.  "locale charmap" is useful to see the
current charmap.

BTW, are you from Iceland?  is_IS means Icelandic, Iceland variant.
en_GB and en_US for English are common, and de_DE for German.

So I run with en_US.UTF-8 on FreeBSD and LANG=<tab> will show you all
the options.  For LC_CTYPE it doesn't matter so much which language you
choose.

To test an "unset" variable, set it to the value "C", which is the
default and roughly means 7-bit ASCII.

So, I just installed luit on my laptop and ssh'd to my private box,
which is normally UTF-8, with:
  luit -encoding iso8859-1 ssh
luit is a wrapper which lets you translate foreign character sets back
to UTF-8, so you can connect to non-UTF-8 systems from a UTF-8 system.

If I set:
  LC_CTYPE=C
and type <Compose><L><-> to see  (should be POUND SIGN, Sterling, for
the British currency) then I get <00a3>.

If I set:
  LC_CTYPE=en_US.ISO8859-15
then I see the "Â" as I should.

These days, you probably want to use the -15 variant instead of the -1
variant, to get Latin 9, which has a few small changes from Latin 1;
most noticeably for many, the international currency symbol is replaced
with the EURO SIGN.  Except that on the FreeBSD (7.0) system, it doesn't
appear to work in ISO8859-15.  Strange.  I'd never noticed before
because I use UTF-8 and frankly I don't care enough to chase down the
cause.

Regards,
-Phil



Messages sorted by: Reverse Date, Date, Thread, Author