[Ecls-list] Unicode: uncomfortable situation

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Wed Jan 26 23:25:22 UTC 2011


Let's see if the uploaded patches are sufficient to make support complete or
at least more usable. What is still missing is to have a default restart
(such as replacing the character by a bogus one) associated to the file or
to its external format.

$ ecl
ECL (Embeddable Common-Lisp) 11.1.1
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.
Top level in: #<process TOP-LEVEL>.
> (with-open-file (s "~/foo.txt" :external-format :us-ascii :direction
:output :if-exists :supersede) (write-char (code-char 1231) s))

Condition of type: STREAM-ENCODING-ERROR
encoding error on stream #<output stream "~/foo.txt"> (:EXTERNAL-FORMAT
(:US-ASCII :LF)): the character with code 1231 cannot be encoded.

Available restarts:

1. (USE-VALUE) Try again with a different supplied code
2. (RESTART-TOPLEVEL) Go back to Top-Level REPL.

Broken at SI:BYTECODES. [Evaluation of: (WITH-OPEN-FILE (S "~/foo.txt"
:EXTERNAL-FORMAT :US-ASCII :DIRECTION :OUTPUT :IF-EXISTS :SUPERSEDE)
(WRITE-CHAR (CODE-CHAR 1231) S))] In: #<process TOP-LEVEL>.
>> (use-value #\a)

#\a
> (si::system "cat ~/foo.txt")
a
0


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20110127/875bcd92/attachment.html>


More information about the ecl-devel mailing list