>>>>> "Rupert" == Rupert Swarbrick <rswarbrick at gmail.com> writes:
Rupert> Raymond Toy <toy.raymond at gmail.com> writes:
>> So I don't have to explicitly say LANG=es_ES:UTF-8 to get utf8?
>> If so, why are there es/ and es.utf8/ directories? I was
>> guessing they were different. (But didn't check to see how
>> they differ.)
Rupert> We decide which one to use in LOCALE-SUBDIR (in
Rupert> init-cl.lisp, with some of the bits now in
Rupert> locale.lisp). Looking more carefully, I think I was wrong
Rupert> and it was using latin1 at first. (Given that I rewrote
Rupert> some of that, it's a bit embarrasing to have
Rupert> misremembered!)
So, LANG=es_ES will use es/ (latin1) and es_ES:UTF-8 will use es.utf8?
Rupert> I've just spent an hour trying to make the build for the
Rupert> utf8 directories slightly more sane and remove some of the
Rupert> repetition, but I'm getting less and less convinced
Rupert> there's any point in having them. As far as I can tell,
Rupert> they're only use is working around the following setup:
Rupert> (1) I'm using a lisp that doesn't support unicode...
Rupert> (2) and a terminal that expects utf-8
Rupert> (3) The documentation is written in latin1
So, basically you're saying utf8 is only useful in the above
situation? Since gcl is still supported and still the default on
Windows, I would say we have to preserve this.
>> I don't know about other lisps, but cmucl doesn't do anything
>> with LANG. Perhaps it should, but it doesn't now. Or at least
>> we can make it do something with it for maxima.
Rupert> Really? So you mean that the code
Rupert> (print (string #\LATIN_SMALL_LETTER_A_WITH_DIAERESIS))
Rupert> will output junk if my terminal isn't set to cmucl's
Rupert> default internal coding system? (utf8?)
It won't be total junk. The default coding system is latin1. If the
character can't be output correctly in the stream external format, a
"?" is used.
On input, if the coded character is invalid, cmucl will replace it
with U+FFFD (unicode replacement character).
Both of these behaviors can be controlled so that an error can be
signaled, but the default is to proceed.
I might consider having maxima look at locale (or local-subdir) and
set up the default external format and stream external format to use
it.
Ray