Subject: Re: finger
To: Perry E. Metzger <perry@piermont.com>
From: Kimmo Suominen <kim@tac.nyc.ny.us>
List: source-changes
Date: 08/11/2002 15:32:12
How is it "a silent surprise" if you explicitly set LC_CTYPE?  I think
of that as the user requesting the use of that character set.  What
else would the user expect by setting LC_CTYPE than to have it actually
cause programs to use that character set?

E.g. "less" and "view" will display ISO-8859-1 characters if you set
LC_CTYPE to allow it, otherwise they only show ASCII, e.g.

- with "en_US.ISO8859-1" vi and less show this text:

    T=E4ss=E4 ty=F6stet=E4=E4n teksti=E4.

- with "C" vi shows the following \x notation:

    T\xe4ss\xe4 ty\xf6stet\xe4\xe4n teksti\xe4.

- with "C" less shows the following bracket-enclosed hex notation:

    T<E4>ss<E4> ty<F6>stet<E4><E4>n teksti<E4>.

Should we have "less" and "view" ignore LC_CTYPE as well, to protect
the user when viewing text files?  I don't think so.

+ Kim


| From:    "Perry E. Metzger" <perry@piermont.com>
| Date:    11 Aug 2002 13:18:17 -0400
|
|
| Kimmo Suominen <kim@tac.nyc.ny.us> writes:
| > Well, the default LC_CTYPE on NetBSD is "C",
|
| Yes, but someone not setting that could end up with an unpleasant, and
| possibly security harming, surprise.
|
| I would suggest that if you want to use an extended character set,
| that's fine, but others shouldn't silently find themselves doing it
| too.
|
| Perry
|