The following commit
--8<-- commit 9d3049763c370622ee1159129ddca919986684b5 Author: Mateusz Krawczuk 209147@student.pwr.edu.pl Date: Sun Nov 4 16:37:24 2018 +0100
if -> else if
--8<--
changed the character encoding of master.pike.in from ISO-8859-1 to UTF-8. (Maybe the commit message should have mentioned this?) Because Pike itself was not informed of this change, the output from "pike --version" is now
--8<-- Pike v8.1 release 13 Copyright © 1994-2018 Linköping University --8<--
in an UTF-8 locale, and
--8<-- Pike v8.1 release 13 Copyright Ã\202© 1994-2018 LinkÃ\203¶ping University --8<--
in an ISO-8859-1 locale, which is not exactly ideal.
A number of questions arise:
1) Is it in fact possible to specify a character encoding other than ISO-8859-1 for master.pike? I suspect not, since #charset is handled by the master...
2) Shouldn't the implementation of --version use the set_charset(0) feature of Stdio.FILE to encode the message with the current locale, instead of blindly assuming an UTF-8 locale (currently there is a hardcoded call to string_to_utf8 here...)? Which I guess means that it's really werror which should do it, so that users of werror/exit don't need to care? (This was actually suggested by Per when he added the string_to_utf8 call in 2009 :)
3) Looking at set_charset(0), isn't it an omission that it doesn't check LC_ALL and LC_CTYPE before LANG?
If nobody protests I'll take a stab at making werror locale sensitive (and updating set_charset(0) to look at LC_ALL and LC_CTYPE).