Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 16 Oct 1995 18:32:36 -0700 (MST)
From:      Terry Lambert <terry@lambert.org>
To:        ache@astral.msk.su (=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=)
Cc:        terry@lambert.org, bde@zeta.org.au, hackers@freefall.freebsd.org, j@uriah.heep.sax.de, kaleb@x.org, phk@critter.tfs.com
Subject:   Re: A couple problems in FreeBSD 2.1.0-950922-SNAP
Message-ID:  <199510170132.SAA26056@phaeton.artisoft.com>
In-Reply-To: <vZ46lWmaY2@ache.dialup.demos.ru> from "=?KOI8-R?Q?=E1=CE=C4=D2=C5=CA_=FE=C5=D2=CE=CF=D7?=" at Oct 17, 95 02:57:56 am

next in thread | previous in thread | raw e-mail | index | archive | help
> Now you vote for solution which is simple subcase of my crt0 hack:
> 
> 	setlocale(LC_ALL, ""); /* my */
> 
> changed to
> 
> 	setlocale(LC_ALL, "lt_LN.ISO_8859-1"); /* your */
> 
> Since your variant is static (and my is adjusted to current LANG),
> you don't need even such call and can patch default table directly.

The difference is, I'm not making a call.

Any you can "patch" a binary by looking for the locale specific table's
symbols in the binary and modifying them.

Or you can patch the source and make the code locale aware.  Like you
should be doing in the first place.

> For LANG = 8859-1 both variants are equal, but for LANG != 8859-1 you
> give some strange values calling them 'default' and I give
> full correct ctype/time/collate table.

If we take the American-specific ASCII C locale per POSIX as opposed to
the 8859-1 specific ISO C locale, we simply increase the "incorrect"
behaviour.

The point of using the POSIX C locale as default is to inconvenience
people, nagging them into makeing their code locale aware.

Technically, ISO C locale permits removal of the nagging for ISO8859-1,
as well as 7 bit ASCII, which is understandable because of who are and
aren't ISO member standards bodies (US, Western European, etc.)

But this does not invalidate the reasons for nagging in the first
place.  And Western European nations (other than English speakers that
can get by with ASCII) don't get their preferred collation sequence
either.  Just like you.  Germany has two sequences (dictionary and
telephone directory order), neither of which are satisfied by a halfway
job of internationalization.

I think you would be hard put to find a program that did strcmp() for
sorting in any case, so it's likely that anything that was collation
sequence sensitive under your hack, would in fact have been written
to call setlocale() specifically in the first place.

The point is to stay within the bounds of the standards.  We have both
precedent and standards recognition for 8859-1 in the C locale.

Yes, this means that code that has not been internationalized will
annoy you until you fix it.  With due respect, this is a *feature*.


					Regards,
					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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