On 09/20/2010 06:34 PM, Eric Blake wrote:
Maybe the sed script in file.sed is non-portable? It's certainly more complex than the normal run-of-the-mill sed script. Or maybe it is that the regex '.' has problems matching non-characters, and the definition of the various locales determine whether 8-bit bytes are characters or not. Is there any portable way to guarantee a single-byte locale where '.' matches all possible 8-bit bytes?
More testing shows that 'LC_ALL=en_US.ISO8859-1 sed' on Darwin gives the desired results, so the problem is definitely a matter of whether the C locale treats all 256 byte values as potential matches to '.'.
-- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org