[cmucl-ticket] [cmucl] #58: UTF-16 buffering problem

cmucl cmucl-devel at common-lisp.net
Wed Apr 18 23:37:32 UTC 2012


#58: UTF-16 buffering problem
---------------------+------------------------------------------------------
 Reporter:  rtoy     |       Owner:         
     Type:  defect   |      Status:  new    
 Priority:  major    |   Milestone:         
Component:  Unicode  |     Version:  2012-04
 Keywords:           |  
---------------------+------------------------------------------------------
 The following code should not cause errors:
 {{{
 (with-open-file (s "test.txt" :direction :output :external-format :utf-16)
   (dotimes (i 300)
     (write-char (code-char i) s)))

 (with-open-file (s "test.txt" :direction :input :external-format :utf-16)
   (dotimes (i 300)
     (let ((ch (read-char s nil nil)))
       (unless (= i (char-code ch))
         (format t "Error at ~D: ~S, ~4X~%" i ch (char-code ch))))))

 }}}

-- 
Ticket URL: <http://trac.common-lisp.net/cmucl/ticket/58>
cmucl <http://common-lisp.net/project/cmucl>
Cmucl is a high-performance, free Common Lisp implementation.


More information about the cmucl-ticket mailing list