Date: Wed, 11 Nov 2015 19:59:00 +0300 From: Andrey Chernov <ache@freebsd.org> To: Baptiste Daroussin <bapt@FreeBSD.org>, arch@FreeBSD.org Cc: marino@FreeBSD.org Subject: Re: Question about ASCII and nl_langinfo (locale work) Message-ID: <564373D4.9060403@freebsd.org> In-Reply-To: <20151110222636.GN10134@ivaldir.etoilebsd.net> References: <20151110222636.GN10134@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) --WOi1xwjF4OwIh33LElCU88o1WHUGgOhCM Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: quoted-printable On 11.11.2015 1:26, Baptiste Daroussin wrote: > The thing is not all are aware that FreeBSD uses US-ASCII, for example = tcl does > not. which means tcl is not able to determine what encoding is needed f= or the C > and POSIX locales. >=20 > On Linux they to return ANSI_X3.4-1968 (also known as US-ASCII) and mos= t > application knows what linux returns. >=20 > That means we need to teach all upstream about US-ASCII all the time. >=20 > The proposals are: > - Do not change what we have always done. > - Change it to something that makes sense "C" (what we tried with "POSI= X" which > was a very bad idea, but "C" seems to be commonly recognised by appli= cation as > ASCII) > - Let's report the same as Linux, that will simplify portability > - Let's be obvious and report ASCII (also commonly recognised by applic= ations) Just repeating my opinion in this new thread. Since POSIX don't tell anything certain, we should be Linux compatible here to have less surprise, i.e.: 1) Return "ANSI_X3.4-1968" for C/POSIX locale (was "US-ASCII"). 2) Return "ASCII" for *.US-ASCII locales (was "US-ASCII"). Typical Linux program knows nothing about our "US-ASCII", and porting handles it rarely. Not doing that leads to hidden, hard to find bugs like still present right now in our tcl ports. For all that years tcl don't understand FreeBSD-native nl_langinfo() "US-ASCII" and falls back to "iso8859-1" (it understands Linux "ANSI_X3.4-1968" and "ASCII" of course). --=20 http://ache.vniz.net/ --WOi1xwjF4OwIh33LElCU88o1WHUGgOhCM Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJWQ3PUAAoJEKUckv0MjfbKFXMH/1pN9IiceIv5m/MIPoUDY/97 ICsZTP8kcfLBNA8CvsbhSmkk6cFbyoxd704sjiVgzx/clrEQJcH5H3bibObuR+Y0 CBd9F2meXIf2jqD0GT3fr9XfN/Lxss+6g3nNK850p0GnrxqPjKdNFIiqNP3CAecS vytnl7tm/NMMaWTHT4tePgB9I8WXgOqxqrSiPTnwqO4T99Fus6rqNUqaOphxDusW MO3w4ZB0q3Zft55tgEEF11XpvJZuBAkEs7JWUSU9hBOXmySSBlcCFZDl2uON1725 /LcD5qYqpiZUMt6b4g2AxkLgZtGMckrSuP89ZGiXX5e9kBkJcEUdCreaGspEVJY= =0kNf -----END PGP SIGNATURE----- --WOi1xwjF4OwIh33LElCU88o1WHUGgOhCM--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?564373D4.9060403>