Re: sbcl unicode
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Tue, 15 Feb 2005 15:55:33 -0700
| Newsgroups | gmane.lisp.uffi.devel |
|---|---|
| Message-ID | <[email protected]> |
Ben wrote: > (defun sbcl-naturalize-cstring (sap &key length (null-terminated-p t)) > ... > ;; this will not work in sb-unicode > (sb-kernel:copy-from-system-area sap 0 > result (* > sb-vm:vector-data-offset > sb-vm:n-word-bits) > (* length sb-vm:n-byte-bits)) > > what's the status of this? how should one efficiently convert from a > known ucs4 alien byte array to a unicode sbcl string? Depends upon what you mean by "known". The best supported way is to convert the entire string. However, if you only want to efficiently convert a subsequence of a foreign string to a sbcl unicode string, that is not yet supported by UFFI for sbcl unicode. [Patches welcomed]. -- Kevin Rosenberg kevin-HJRc7zDS/[email protected]