Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Nov 2015 19:19:47 +0300
From:      Andrey Chernov <ache@freebsd.org>
To:        Baptiste Daroussin <bapt@FreeBSD.org>
Cc:        tcltk@FreeBSD.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r290637 - head/lib/libc/locale
Message-ID:  <56421923.7080601@freebsd.org>
In-Reply-To: <20151110161204.GM10134@ivaldir.etoilebsd.net>
References:  <201511100811.tAA8BR0R034338@repo.freebsd.org> <5641E7B4.2070508@freebsd.org> <20151110130430.GK10134@ivaldir.etoilebsd.net> <5641EF26.8060600@freebsd.org> <20151110133615.GL10134@ivaldir.etoilebsd.net> <5642163E.1050405@freebsd.org> <20151110161204.GM10134@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--PuKg2eHPNNvjl8UeQ6v8WHta5mjDtdWw2
Content-Type: text/plain; charset=koi8-r
Content-Transfer-Encoding: quoted-printable

On 10.11.2015 19:12, Baptiste Daroussin wrote:
> On Tue, Nov 10, 2015 at 07:07:26PM +0300, Andrey Chernov wrote:
>> On 10.11.2015 16:36, Baptiste Daroussin wrote:
>>> On Tue, Nov 10, 2015 at 04:20:38PM +0300, Andrey Chernov wrote:
>>>> On 10.11.2015 16:04, Baptiste Daroussin wrote:
>>>>> On Tue, Nov 10, 2015 at 03:48:52PM +0300, Andrey Chernov wrote:
>>>>>> On 10.11.2015 11:11, Baptiste Daroussin wrote:
>>>>>>> Author: bapt
>>>>>>> Date: Tue Nov 10 08:11:27 2015
>>>>>>> New Revision: 290637
>>>>>>> URL: https://svnweb.freebsd.org/changeset/base/290637
>>>>>>>
>>>>>>> Log:
>>>>>>>   return "US-ASCII" instead of "POSIX" for "C" and "POSIX" locale=
s
>>>>>>>   as it used to be in previous version of the locales. Returning
>>>>>>>   "POSIX" has too many fallouts.
>>>>>>
>>>>>> You can return "ANSI_X3.4-1968" (another name of "US-ASCII") to be=

>>>>>> different with real US-ASCII. It is what glibc returns for C/POSIX=

>>>>>> locale and most ports expected, being linux-oriented.
>>>>>>
>>>>> I thought about it, but in the end it is probably safer for now tha=
t nl_langinfo
>>>>> return US-ASCII as it did in the past, to reduce breakage with Free=
BSD only code
>>>>> that maybe be existing ou there.
>>>>
>>>> All FreeBSD code I know never check locale this way. IMHO probabilit=
y of
>>>> potential danger to meet some linux-oriented port with this check is=

>>>> much much higher than to meet similar FreeBSD only code in the wild.=
 In
>>>> any case, changing collate order from A-Za-z to aA-zZ we do just now=

>>>> have much higher probability to break unknown FreeBSD only code, so =
one
>>>> breaking change can go with other one together.
>>>>
>>> That is true, except that the new collation thing is invalidated as s=
oon as you
>>> set LC_COLLATE=3DC which bring your back to A-Za-z. So you have a wor=
karound while
>>> changing the return value of nl_langinfo() is not workaroundable.
>>
>> Well, forget my improper comparison with collate and see this bug in
>> action right now, in our port tcl8.6.4/unix/tclUnixInit.c:
>>
>> See localeTable and comment above it, there is internal "ansi_x3.4-196=
8"
>> (i.e. POSIX locale), internal "ascii" and even no alias for our
>> "us-ascii" at all.
>>
>> It gets info through nl_langinfo(CODESET), lowercased. I.e. not using
>> "ANSI_X3.4-1968" breaks all tcl ports right now, this is more essentia=
l
>> than hypothetical private FreeBSD only code no one see.
>=20
> That one is a valid point, that also means that is is broken right now =
on
> FreeBSD 10 and below?

Yes. It can't map our C locale to the some of internal ones and falls
back to TCL_DEFAULT_ENCODING "iso8859-1"

--=20
http://ache.vniz.net/


--PuKg2eHPNNvjl8UeQ6v8WHta5mjDtdWw2
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJWQhkjAAoJEKUckv0MjfbKZJ8H/1WmexGjac80HoT4GC1YoiZc
1tHQqlfakh3619HpOTw3biKdWOjVH1wpVxTNin/yelA9REmKhH6IM+T29Wk5MjvV
tCM/B+PPDLa5tbgSfH6+V9PdCtSDvSK9U62oBWtgdexekYv3Pvno0e0e9vkbVm0H
34mGw/w6uyUVtrMtTrIG9xr9O5RK3BL7xJV9heTstI4vyeVrQcb4Sl4VmSEny8y0
wRhqBbPfgzejv9sS4Df00hdvZ8TSLxirrGkPwSi64KOfhJBub9U6HIlvm98ePgcc
Gfwf2yDjLA4jvqe2Eemd7fTTJPBvThJCcFdEOUWtweGNWjlhFGdjRqPjrjLLB3M=
=c9LU
-----END PGP SIGNATURE-----

--PuKg2eHPNNvjl8UeQ6v8WHta5mjDtdWw2--



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