[slime-devel] how to use utf-8, iso-8859-1 with clisp
Stas Boukarev
stassats at gmail.com
Wed Sep 22 02:16:52 UTC 2010
Mirko Vukovic <mirko.vukovic at gmail.com> writes:
> On Tue, Sep 21, 2010 at 8:47 PM, Stas Boukarev <stassats at gmail.com> wrote:
>> Mirko Vukovic <mirko.vukovic at gmail.com> writes:
>>
>>> Hello,
>>>
>>> (this is with clisp 2.48 on cygwin + windows XP and slime )
>>>
>>> I can start up clisp on my laptop with utf-8 and iso-8859-1 encodings
>>> (clisp -E utf-8, for example)
>>>
>>> However, setting `slime-net-coding-system' to utf-8 or iso-8859-1
>>> gives a slime start-up error since the allowed encodings are
>>> utf-8-UNIX, iso-8859-1-UNIX (capitalization mine).
>>>
>>> I can easily change that in `slime-net-valid-coding-systems'. But
>>> what is going on here?
>>>
>> You should set slime-net-coding-system to 'utf-8-unix.
>>
>> --
>
> utf-8-unix does not work for me:
>
> I have a csv file with german umlauts (which begs the question are
> there non-german umlauts?)
>
> In bare clisp, I can read this file with under iso-8859-1 encoding,
> but not with utf-8 encoding.
> Error message is:
> *** - READ-CHAR: Invalid byte sequence #xE4 #x74 #x20 in CHARSET:UTF-8
> conversion
iso-8859-1 and utf-8 are different encodings, you should read your file
in whatever encoding it is. And encoding of the communication between
slime and swank doesn't have anything to do with encoding of files.
Set your slime-net-coding-system to 'utf-8-unix and start clisp with
utf-8, but read your file with
(with-open-file (stream file :external-format charset:iso-8859-1) ...)
--
With Best Regards, Stas.
More information about the slime-devel
mailing list