Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 15 Oct 1995 20:06:30 EST
From:      "Kaleb S. KEITHLEY" <kaleb@x.org>
To:        hackers@freefall.FreeBSD.org
Cc:        joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch)
Subject:   Re: A couple problems in FreeBSD 2.1.0-950922-SNAP 
Message-ID:  <199510160006.UAA06783@exalt.x.org>
In-Reply-To: Your message of Mon, 16 Oct 1995 00:03:59 EST. <199510152303.AAA22305@uriah.heep.sax.de> 

next in thread | previous in thread | raw e-mail | index | archive | help

> As Kaleb S. KEITHLEY wrote:
> > 
> > As near as I can tell the SVR4 ls doesn't change its locale, yet still
> > manages to do the right thing, probably because for most SVR4-en the C 
> > locale is full ISO8859-1. This leads me to believe that FreeBSD's ls
> > probably doesn't need to change its locale either if the default chartype
> > table is fully populated.
> 
> So SVR4 would still break on koi8-r, for example.  

No it wouldn't because SVR4 doesn't have a koi8-r locale. If it has
anything it probably is based on ISO8859-5, which, if I'm not mistaken,
uses ASCII on the left side and Cyrillic on the right side; thus a multi-
byte string like a file name might look different in one locale than in
another. 

I have a perhaps naive presumption that if I created a multi-byte string 
in a particular locale that I would always try to look at it in the same 
locale.

The only way to *really* solve this is to do something like use widechar 
strings in the file system and declare that all filenames are encoded
in something like Unicode. Unless I misunderstood him, this is what Terry 
Lambert was lobbying for a couple of weeks ago, when he was asking for
16-bit wchar_t. This has all kinds of implications, but let's not go down
that rathole right now. :-)

> Either make it right, or let it be.

Define right! I don't see it as wrong to populate the right half of the
default chartype table with values that are useful in some particular
locale -- in this case "C". No more wrong than leaving them blank. It 
is merely a convenience simple programs be able to do something useful 
for the majority of the users. Is the customer always right? If a 
particular tool isn't very useful in the general case, a customer might 
choose another another tool that is, in the general case, more useful.

> 
> isctype() is not necessarily related to message catalogs.  

??? I didn't say it was. I said that changing programs to set the locale
was not very interesting (or necessary) unless you were going to make
them use message catalogs for their output.

>The
> extensive (i.e. blatant) use of message catalogs (AIX, IRIX) leads to
> very undesirable results, e.g. SMTP daemons throwing their error
> messages in German. :-(

It's hard for me to know how something like smtpd would get its locale
set to de_DE in order to do that, but I wonder if that wouldn't be what
I'd want if I were in Germany.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510160006.UAA06783>