[Openmcl-devel] utf-16-stream-encode bug 2

Takehiko Abe keke at gol.com
Mon Apr 2 08:03:01 PDT 2007


Please disregard the patch i sent previously. There's another
typo in u1-unicode-.lisp.

# is missing for :bom-encoding for (define-character-encoding :utf-16 ...)
form.

openmcl writes wrong bom -- #xBFD2 instead of #xFEFF -- for
a UTF-16 file. I'm still hunting for it. but my times up for tonight.




Index: level-1/l1-unicode.lisp
===================================================================
RCS file: /usr/local/tmpcvs/openmcl-dev/ccl/level-1/l1-unicode.lisp,v
retrieving revision 1.16
diff -u -r1.16 l1-unicode.lisp
--- level-1/l1-unicode.lisp	3 Dec 2006 09:26:55 -0000	1.16
+++ level-1/l1-unicode.lisp	2 Apr 2007 14:56:55 -0000
@@ -3027,7 +3027,7 @@
         1)
       (progn
         (funcall write-function stream (logior #xd800 (the fixnum (ash
highbits -10))))
-        (funcall write-function (logior #xdc00 (the fixnum (logand
highbits #x3ff))))
+        (funcall write-function stream (logior #xdc00 (the fixnum
(logand highbits #x3ff))))
         2))))
 
 (defun utf-16-stream-decode (1st-unit next-unit-function stream)
@@ -3648,7 +3648,7 @@
   :use-byte-order-mark
   #+big-endian-target :utf-16le
   #+little-endian-target :utf-16be
-  :bom-encoding #+big-endian-target #(#xfe #xff) #+little-endian-target
#(#xff fe)
+  :bom-encoding #+big-endian-target #(#xfe #xff) #+little-endian-target
#(#xff #fe)
   )
 
 





More information about the Openmcl-devel mailing list