Re: base-char bug with SBCL unicode
Christophe Rhodes <[email protected]> Tue, 28 Dec 2004 12:36:58 +0000 (GMT)
| Newsgroups | gmane.lisp.clx.devel |
|---|---|
| Message-ID | <[email protected]> |
On Tue, 28 Dec 2004, Robert Strandh wrote: > Today, I tripped over a bug in which some (probably inlined) call to > char->card8 blew up for non-ascii characters. Christophe Rhodes seems > to think it is the use of base-char in this code snippet in the file > dependent.lisp: > > Christophe thinks (sb-kernel:character-set ((0 . 255))) would be more > appropriate for SBCL. Actually, I think I've changed my mind: absent any indication to the contrary, I would expect char->card8 to work strictly for ASCII; certainly that's what the CLX manual leads me to expect. Possibly it should work for the first 255 code points of Unicode (aka iso-8859-1) but it's not clear to me that you should be relying on this. I would recommend instead either performing the conversion to iso-8859-1 character codes yourself, or else using char-code directly (on the understanding that SBCL, and indeed most implementations around now, is unlikely to be eccentric enough to define character codes differently from Unicode). Cheers, Christophe _______________________________________________ Portable-clx mailing list [email protected] http://lists.metacircles.com/cgi-bin/mailman/listinfo/portable-clx cvs -d :ext:cvs.telent.net:/usr/local/src/cvs co clx # over ssh cvs -d :pserver:[email protected]:/cvs co clx # anonymous