Re: Building Bison 3.7 with musl (was Re: portability issues with unicodeio)

Rich Felker <[email protected]>
Newsgroups gmane.linux.lib.musl.general,gmane.comp.parsers.bison.bugs
Message-ID <[email protected]>
On Wed, Jul 29, 2020 at 06:23:19PM -0500, A. Wilcox wrote:
> Seeing some weird behaviour here building Bison 3.7 on musl libc.
> 
> Something seems to be "intelligent" enough to know that \u2022 is a
> bullet character, and is replacing it with "*" instead of ".", causing
> all the tests to fail:
> 
> awilcox on gwyn [17] bison: LC_ALL=C /bin/printf '\u2022\n' | od -t x1
> 0000000 2a 0a
> 0000002

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.

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.

Rich
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.