From owner-freebsd-arch@freebsd.org Mon Nov 16 19:00:39 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 A022EA30983 for ; Mon, 16 Nov 2015 19:00:39 +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 7C0391F9C for ; Mon, 16 Nov 2015 19:00:39 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by mailman.ysv.freebsd.org (Postfix) id 7B838A3097E; Mon, 16 Nov 2015 19:00:39 +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 62CEAA3097D for ; Mon, 16 Nov 2015 19:00:39 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: from mail-lf0-f45.google.com (mail-lf0-f45.google.com [209.85.215.45]) (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 0B5831F97 for ; Mon, 16 Nov 2015 19:00:38 +0000 (UTC) (envelope-from mailing-machine@vniz.net) Received: by lfs39 with SMTP id 39so92786608lfs.3 for ; Mon, 16 Nov 2015 11:00:31 -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 :content-transfer-encoding; bh=upYORXjRpJCDnlaagLPb2e99FHm54EOg0QM4e+0p8tA=; b=eZMuPVcXwXSQMyHIeq9GglfCMxKFB1kjMapIOaIGvQLr9oiYhLLSPAICqBC1aSSNcd BJnvOp39BtuNz7Pu1+9VSByyWVqkIJy4mTaQszGLjH/Nl+GwRZNJKck7Ki8Q4/1lTNuh LbPVQCi0DpOjkunoYYdo5fTx0yZY2PuPp+ESxUCpTgrSE5szHmiAsnVRNRgwQWaLLTVW fTQRP0X21eYwTZZTQyRtjQA1S6hDhDv22HkczIlyiVSaLvgW9jikb1gdHliO2b1uQZvp Y7RyuIWcwSfxmsDSOPgK4DGnPpYUFnMzxSCU+V9pT+Qx4ZnHfNhRzVarPFV2pRPnwaHF 4l+Q== X-Gm-Message-State: ALoCoQntjGLh3yHWG54se6WNcNzHvXuP+0J5Ba0lMS3JpWlO03jRjtFY/eMrTt0caTsPBuuNVPO7 X-Received: by 10.25.33.4 with SMTP id h4mr4371718lfh.3.1447700431248; Mon, 16 Nov 2015 11:00:31 -0800 (PST) Received: from [192.168.1.2] ([89.169.173.68]) by smtp.gmail.com with ESMTPSA id j189sm821893lfg.46.2015.11.16.11.00.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 16 Nov 2015 11:00:30 -0800 (PST) Subject: Re: Question about ASCII and nl_langinfo (locale work) To: Ed Schouten , Baptiste Daroussin References: <20151110222636.GN10134@ivaldir.etoilebsd.net> Cc: arch@freebsd.org, marino@freebsd.org From: Andrey Chernov X-Enigmail-Draft-Status: N1110 Message-ID: <564A27CD.7090908@freebsd.org> Date: Mon, 16 Nov 2015 22:00:29 +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: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: Mon, 16 Nov 2015 19:00:39 -0000 On 16.11.2015 20:35, Ed Schouten wrote: > I personally think it's a shame if we were to deviate from returning > "US-ASCII", for the reason that "US-ASCII" also happens to be the > preferred MIME name for the character set: > > http://www.iana.org/assignments/character-sets/character-sets.xhtml > > "ASCII" doesn't even seem to be an alias for this character set. Yes, I overlook it somehow. ASCII is not in the IANA, while both ANSI_X3.4-1968 and US-ASCII are. So, I reconsider the proposal. We can return ANSI_X3.4-1968 for POSIX/C (for Linux compatibility reasons) and left pure US-ASCII as it was (since it is used rarely). > In my opinion a decent implementation of newlocale() should support > any of the character set names and aliases provided on the IANA page, > but let nl_langinfo(CODESET) return the preferred MIME name. BTW, we already have and return non-IANA codesets historically (inspired by X11). I.e. we have ISO8859-* instead of preferred names ISO-8859-*, moreover, ISO8859-* even not the aliases (!) and IANA knows nothing about them. Linux have IANA preferred names here, i.e. ISO-8859-*. So the question is: should we rename ISO8859-* to ISO-8859-* to be IANA and Linux compatible? We can strip first (or all) "_" and "-" from the environment names (as Linux does), to not violate POLA. >> That means we need to teach all upstream about US-ASCII all the time. > > Could you come up with a concrete list of pieces of software that need > to be changed? Is it just those three pieces of software that you > mentioned above? If so, then I think it would be a shame to make the > concession. No, I see such checks many times in other programs too, tcl is just one which can be found quickly. The proper procedure to examine situation will be to unpack _all_ ports and search through the code, but my machine can't handle it. -- http://ache.vniz.net/