more about build-index+cl-ppcre branch & encodings
- Subject: more about build-index+cl-ppcre branch & encodings
- From: Raymond Toy
- Date: Thu, 03 Mar 2011 17:29:34 -0500
On 3/2/11 11:48 PM, Douglas Crosher wrote:
>
> Using a byte offset also makes buffering problematic. For example:
>
> (with-open-file (ostream "ctest.txt" :direction :output
> :external-format #+clisp "utf-8" #-clisp :utf-8)
> (dotimes (i 1000)
> (write-char (code-char #x1234) ostream)))
>
> (with-open-file (stream "ctest.txt" :direction :input
> :external-format #+clisp "utf-8" #-clisp :utf-8)
> (let ((p0 (file-position stream))
> (ch (read-char stream)))
> (unread-char ch stream)
> (let ((p0* (file-position stream)))
> (if (eql p0* p0) "Ok" "Broken"))))
>
> SCL: Ok
> CLISP: Broken
> CMUCL (Unicode): Broken
This is a bug in cmucl. Fixed now.
Ray