Raymond Toy <toy.raymond at gmail.com> wrote:
> Maxima branch_5_27_base_65_g08552c3_dirty http://maxima.sourceforge.net
> using Lisp Clozure Common Lisp Version 1.8-r15286M (LinuxX8664)
> (%i1) subst (?=2, ?^2);
Lots of confusion here. The original question was about which Lisp
support utf-8, not whether some particular build of Maxima on some
particular platform supports it.
All serious modern CL implementations support a large number of external
formats. How the default external format is selected is not
standardized. I believe SBCL and Allegro determine the default external
format at startup from the LOCALE environment variable. In most Linux
setups, the default LOCALE is C, which implies IS8859-1, aka Latin-1.
The CCL documentation implies it works differently:
http://ccl.clozure.com/ccl-documentation.html
Don't know if that documentation is current, but see section 4.5.4.4
Clozure CL uses ISO-8859-1 encoding for *TERMINAL-IO* and for all
streams whose EXTERNAL-FORMAT isn't explicitly specified. The default
for *TERMINAL-IO* can be set via the -K command-line argument.
Whatever the developers choose, IMO it would be poor to set some
particular external format, since that would certainly be the wrong
thing when attempting to run on a machine (or window) using something
else. I believe there are still many machines in the Far East running
with non-Unicode encodings. Ideally, Maxima should rely on the
underlying CL to set up the correct default external format at start
time. For Lisp implementations that don't get it right out of the box,
but which are still capable of utf-8, there should be some
conditionalize code to try to get it right.