[Openmcl-devel] *default-character-encoding* should be :utf-8

Tom Emerson tremerson at gmail.com
Mon Mar 5 05:44:50 PST 2012


On Mon, Mar 5, 2012 at 8:31 AM, Antony <lisp.linux at gmail.com> wrote:
> shouldn't there be separate specials for controlling "source file" (for a
> set of functions such as load-file)
> default encoding versus the general external encoding.
> I'd think then making the source encoding utf-8 would be fine (ostensibly
> the user will compile the code in dev and fix it).
> Taking source file encoding from environment in these days of free source
> libs seems rather silly.
> Any other data should be user problem even if there is a helpful default
> encoding that is taken from environment.

This is essentially the route that Java takes: source files are, by
definition, in UTF-8. When opening a text file for reading/writing
with a java.io.FileReader/FileWriter it uses the current locale to
specify the encoding. If you, the developer, wants to be more
specific, then you cannot use the convenience wrappers and need to
open the stream with an explicit transcoder.

    -tree

-- 
Tom Emerson
tremerson at gmail.com
http://www.dreamersrealm.net/tree



More information about the Openmcl-devel mailing list