From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 5431 invoked from network); 30 Jul 2020 01:44:01 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 30 Jul 2020 01:44:01 -0000 Received: (qmail 7426 invoked by uid 550); 30 Jul 2020 01:43:54 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 7405 invoked from network); 30 Jul 2020 01:43:54 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1596073422; s=strato-dkim-0002; d=clisp.org; h=References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From: X-RZG-CLASS-ID:X-RZG-AUTH:From:Subject:Sender; bh=GmQld3FqaB3PitZ+UiR0NAX9mTjwJQkeCrb86Bp+cVU=; b=E6jfYw+tgwXj2xfT2EnqAJ/4aprsI5iz9gpch1bt1mhHoW5u+8LjpeRN26EkCCM+I3 GILz5ru5h5I+8NgTBCFNAE7PtIBSR3WXzJN6OOni3cHvCx/rlNsldU45lk83tDxeY8VI MKnkorONUFR27WcHuxoOSYoLr5zsD/3NRZY5fYFyG+oWXZYwAt9+a9p26sygF1SgBEh+ 2cYLGy4VQ3+RqQDHgypwS/f7CRt3RhMiaEfAXLRp/Z4aUIUQ+ALNjomqFDZwShF7YcHk +M5C9qp4n0FdOhQjwy71GcEx2LtAE1eBbQPBQ7t1aq3mFk94g93Ns7g0BHN9IHKq4sx2 D1Bg== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOH6fzxfs=" X-RZG-CLASS-ID: mo00 From: Bruno Haible To: Rich Felker Cc: "A. Wilcox" , bug-bison@gnu.org, musl@lists.openwall.com, bug-gnulib@gnu.org Date: Thu, 30 Jul 2020 03:43:40 +0200 Message-ID: <2117749.CLknGyfR5K@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-186-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20200730000527.GS6949@brightrain.aerifal.cx> References: <20200730000527.GS6949@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [musl] Building Bison 3.7 with musl (was Re: portability issues with unicodeio) [CCing bug-gnulib] Rich Felker wrote: > I don't think the '*' has anything to do with it being a bullet > character. It's just the implementation-defined replacement character > musl's iconv uses. Correct. > I would guess the code in bison and coreutils printf is assuming the > non-conforming glibc behavior for iconv of returning an error if a > character from the input is not exactly representable in the output, > rather than making replacements and returning the number of inexact > conversions made. Yes and no. The code is not making assumptions about a particular iconv() implementation. But it needs to distinguish two categories of replacements done by iconv(): - those that are harmless (for example when replacing a Unicode TAG character U+E00xx with an empty output), - those that are better not presented to the user, if the programmer has specified a fallback (for example, replacing all non-ASCII characters with NUL, '?', or '*'). The standards don't help in making the distinction. Therefore whether you consider said glibc and libiconv behaviour as "non-conforming" or not is irrelevant. I have now adjusted the code to handle musl libc better. Bruno