Thanks for pointing out the problem. The bad behavior of gzip comes because I thought programs in macOS etc. start off in the "C" locale, and that this locale uses UTF-8. But I see now that the default locale is single-byte, and that one must use setlocale with the "C.utf8" (or similarly-named) locale to get a "C"-like locale with UTF-8 encoding.

I'd like to avoid the use of setlocale even in these environments, if possible, as gzip is supposed to be small and "primitive". But I agree that the behavior in current master is bad. I'll try to think of a better solution.



Reply via email to