The base-char issue again...

"Steven Githens (as steve at githens dot org)" <[email protected]>
Newsgroups gmane.lisp.lispworks.general
Message-ID <[email protected]>
Hi all,

I'm having a regression of a recurring issue with unicode characters, 
which I've fixed in other parts of my code base, but now I'm having the 
darnest time trying to write some unicode to a text file, and after 
reviewing the mailing list and my other file access, I can't figure out 
what the issue is.  It must be something obvious I'm missing... can 
anyone see what I'm doing wrong below.  I've got the default char 
element type set in .lispworks.  This is on macOS 8.1.0 ( I haven't 
upgraded to 8.1.1 yet, but I didn't see anything liek this in the 
release notes). Just trying to include unicode chat 0x2019.

Cheers,
Steve


CL-USER 1 > *default-character-element-type*
CHARACTER

CL-USER 2 > (defun test-single-quote ()
   (with-open-file (fs "/Users/sgithens/testlisp-lw.txt" :direction ':output
                       :element-type 'character :if-exists :supersede)
     (write-line "Some test text2: ’" fs)))
TEST-SINGLE-QUOTE

CL-USER 3 > (test-single-quote)

Error: #\’ (of type CHARACTER) is not of type BASE-CHAR.
   1 (abort) Return to top loop level 0.

Type :b for backtrace, or :c <option number> to proceed, or :a to abort.
Type :bug-form "<subject>" for a bug report template or :? for other 
options.

CL-USER 4 : 1 > :top

CL-USER 5 > (defun test-single-quote2 ()
   (with-open-file (fs "/Users/sgithens/testlisp-lw.txt" :direction ':output
                       :element-type '(unsigned-byte 8.) :if-exists 
:supersede)
     (write-line "Some test text2: ’" fs)))
TEST-SINGLE-QUOTE2

CL-USER 6 > (test-single-quote2)

Error: #\’ (of type CHARACTER) is not of type BASE-CHAR.
   1 (abort) Return to top loop level 0.

Type :b for backtrace, or :c <option number> to proceed, or :a to abort.
Type :bug-form "<subject>" for a bug report template or :? for other 
options.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
[email protected]
http://www.lispworks.com/support/lisp-hug.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.