From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/8536 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: localeconv and char values Date: Mon, 21 Sep 2015 10:54:25 -0400 Message-ID: <20150921145425.GQ17773@brightrain.aerifal.cx> References: <89422A70-4BF6-4733-9400-0932A85857F9@gmail.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1442847295 20679 80.91.229.3 (21 Sep 2015 14:54:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 21 Sep 2015 14:54:55 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-8548-gllmg-musl=m.gmane.org@lists.openwall.com Mon Sep 21 16:54:55 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1Ze2UQ-0004VS-28 for gllmg-musl@m.gmane.org; Mon, 21 Sep 2015 16:54:46 +0200 Original-Received: (qmail 29757 invoked by uid 550); 21 Sep 2015 14:54:41 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 29710 invoked from network); 21 Sep 2015 14:54:39 -0000 Content-Disposition: inline In-Reply-To: <89422A70-4BF6-4733-9400-0932A85857F9@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:8536 Archived-At: On Mon, Sep 21, 2015 at 12:21:34PM +0200, Julien Ramseier wrote: > Hello, > > Currently, all the char fields of the lconv struct returned by > localeconv are set to -1. > > According to > http://pubs.opengroup.org/onlinepubs/9699919799/functions/localeconv.html > , > negative values are not valid and CHAR_MAX should be used to > indicate non-available values. As far as I can tell, you are right. I don't know how I overlooked/misread this, except perhaps that using CHAR_MAX is rather ugly/inappropriate because it assumes CHAR_MAX is not an interesting character that could be used for these purposes. Thankfully that's true for ASCII and ASCII supersets (in our case, UTF-8), so it's not a practical problem. > If I’m not missing anything, here’s the corresponding patch: I'll look it over again before committing, but I don't see anything immediately wrong with it. Thanks! Rich