AUTHORS list and the C locale on Mac OS X

Charles Davis cdavis at mymail.mines.edu
Tue Nov 9 13:02:51 CST 2010


Hi,

There may be a problem with the way the authors.c file is generated on a
Mac with GNU sed installed.

On Mac OS X, the C locale's default encoding is MacRoman, not UTF-8.
This has some pretty surprising consequences. For example, since the
AUTHORS file contains UTF-8 multibyte sequences that aren't valid in the
MacRoman encoding, GNU sed doesn't match those sequences in the .*
regexp, and the authors.c file comes out wrong. Mac OS sed does not have
this problem. So now I'm stuck changing the Makefile to use the system
sed (in /usr/bin) instead of GNU sed.

I could uninstall GNU sed, but there's one small problem. I have a
Gentoo prefix set up. It is the reason I have GNU sed installed. If I
install or upgrade practically anything in my Gentoo prefix, then GNU
sed will just get pulled right back in.

Reading the manual for GNU sed tells me that this is by design and that
this behavior--not matching characters that are invalid in the current
locale--is in fact mandated by POSIX. If that's the case, then the
LC_ALL= statement in the Makefile needs to change. To what, I don't
know. I'm hoping one of you has an idea.

If you think, however, that this is a bug in GNU sed, then I will gladly
write a report to the maintainer about it.

Chip



More information about the wine-devel mailing list