[Bug-openmcl] file encoding

Gary Byers gb at clozure.com
Mon Nov 26 17:24:02 MST 2007


The reason why there's a command-line option for setting *terminal-io*'s
encoding is that *terminal-io* needs to be created before any --eval
or --load options are processed and before the init file is loaded;
doing

(setq ccl::*terminal-character-encoding-name* :utf-8)

in your init file or in an --eval expression wouldn't affect the
encoding used in the one and only instance of *TERMINAL-IO* that
already exists.  (If (SETF (STREAM-EXTERNAL-FORMAT ...) ...) worked
a bit better and in more cases, then this wouldn't be an issue; you
could just do:

(setf (stream-external-format *terminal-io*) ...) in your init
file and there'd be no need for the command-line option.)

This is different  from the case for file/socket encodings, where
setting the default encoding via other means has the intended
effect.

On Tue, 13 Nov 2007, Dmitri Hrapof wrote:

> Hello!
>
> Not really a bug, but after delving for some time in Clozure Lisp
> internals, I strongly believe a new comman-line switch or a text in
> --help message like
> "
> to set the default file encoding, use --eval '(setf
> *default-file-character-encoding* :utf-8)'
> "
> would be very useful.
>
> Sincerely yours,
> Dmitri
> _______________________________________________
> Bug-openmcl mailing list
> Bug-openmcl at clozure.com
> http://clozure.com/mailman/listinfo/bug-openmcl
>
>


More information about the Bug-openmcl mailing list