From owner-freebsd-arch@freebsd.org Wed Nov 11 16:59:12 2015 Return-Path: Delivered-To: freebsd-arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B4FE5A2C131 for ; Wed, 11 Nov 2015 16:59:12 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 8F00013B3 for ; Wed, 11 Nov 2015 16:59:12 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mailman.ysv.freebsd.org (Postfix) id 8C74CA2C130; Wed, 11 Nov 2015 16:59:12 +0000 (UTC) Delivered-To: arch@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73ACAA2C12F for ; Wed, 11 Nov 2015 16:59:12 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f41.google.com (mail-lf0-f41.google.com [209.85.215.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1E5AF13B2 for ; Wed, 11 Nov 2015 16:59:11 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lfs39 with SMTP id 39so19567671lfs.3 for ; Wed, 11 Nov 2015 08:59:03 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type; bh=SBf4UVyvt1WZvnKAma7rk0rWP2YS5XlaJeIbm4T0e80=; b=mzie8vAKN2NqWn8yMbRhZfpJu4mPVsdVS5EUOv4i3k1bBuK2zRwmMiuraM+qcBK6RX LOtAKNW9s9ZxznGhUUgt0Za/zNb6ejaglTf2xd6efxOSUOh4RYGAzytbx0pBspHTqHuG 6dn4PkZkRJd0egU2X9ImORsI0fyQ0d5D1QI3OBWEFcTE6hGQBaBp6VjeXzf9RSPYb0V9 X24y4DebdW6BYOk2B6np+hMAmMSYlE4ROGhtgCP/LBeB6bDFKVqIOYC71ZYb55Sqmp0W yKh8U6kuKzD0J91SnLBMTT2PzaR2nSsVNLokZINMAv6GXk7qtU8ifYtfJBzx86J1Qxbb O8hw== X-Gm-Message-State: ALoCoQlYzrWkMEMlyRcY0wWRK29ouUhZusUx/a+0cDSneX6mLNLr6Q0qNyowadgd67j7j0T2nWQC X-Received: by 10.25.164.66 with SMTP id n63mr4862771lfe.24.1447261143838; Wed, 11 Nov 2015 08:59:03 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id l5sm1573105lbc.36.2015.11.11.08.59.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Nov 2015 08:59:02 -0800 (PST) Subject: Re: Question about ASCII and nl_langinfo (locale work) To: Baptiste Daroussin , arch@FreeBSD.org References: <20151110222636.GN10134@ivaldir.etoilebsd.net> Cc: marino@FreeBSD.org From: Andrey Chernov X-Enigmail-Draft-Status: N1110 Message-ID: <564373D4.9060403@freebsd.org> Date: Wed, 11 Nov 2015 19:59:00 +0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151110222636.GN10134@ivaldir.etoilebsd.net> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WOi1xwjF4OwIh33LElCU88o1WHUGgOhCM" X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Nov 2015 16:59:12 -0000 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--