cl-rw

Layered streams for Common Lisp
git clone https://logand.com/git/cl-rw.git/
Log | Files | Refs

commit 72b128e9936004b68e1b95eacc55dabae8179654
parent f14af80b8986d7171e2fc6333a973b4c93c7665b
Author: Tomas Hlavaty <tom@logand.com>
Date:   Sat, 25 Apr 2015 19:38:12 +0200

mkcl port octet/string conversion, utf-8 only so far

Diffstat:
Mstring.lisp | 12++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/string.lisp b/string.lisp @@ -28,8 +28,12 @@ (in-package :rw.string) (defun octets-to-string (x encoding) - #-(or allegro clisp ecl ccl sbcl allegro) + #-(or mkcl allegro clisp ecl ccl sbcl allegro) (error "RW.STRING:OCTETS-TO-STRING not ported") + #+mkcl + (progn + (assert (member encoding '(nil :utf-8))) + (string (si:utf-8 x))) #+clisp (ext:convert-string-from-bytes x (intern (string encoding) (find-package :charset))) @@ -44,8 +48,12 @@ (excl:octets-to-string x :external-format encoding)) (defun string-to-octets (x encoding) - #-(or allegro clisp ecl ccl sbcl allegro) + #-(or mkcl allegro clisp ecl ccl sbcl allegro) (error "RW.STRING:STRING-TO-OCTETS not ported") + #+mkcl + (progn + (assert (member encoding '(nil :utf-8))) + (mkcl:octets (si:utf-8 x))) #+clisp (ext:convert-string-to-bytes x (intern (string encoding) (find-package :charset)))