Ticket #912 (new defect)
Let's use POSIX locale for *terminal-io* character encoding by default.
|Reported by:||pjb@…||Owned by:|
On unix systems, the terminal encoding is specified with the locale environment variables.
Typically, LC_ALL, or LC_MESSAGE, or LC_CTYPE are set to something like en_US.UTF-8 to specify that the terminal uses UTF-8 (and that the user wants messages in US English).
When the -K option is not given, ccl should honor those environment variables, and set the character encoding of the *terminal-io* stream accordingly. If not done by ccl, it means that any program compiled with ccl must be wrapped into a shell script to pass the right -K option...
Alternatively, or additionnally, providing an API to let the program set the character encoding of the *terminal-io* stream would allow the applications to do it themselves. (There's already an API to set the character encoding of the file contents and the socket streams, why not the other sources/sinks of text?).