Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix (string-to-octets simple-base-string :encoding :utf-16)

Ignore-this: 1bc55233779a6af2d204e76d869c613d

darcs-hash:20081124205455-6b9e8-681bf983fbddfc3d66600c783be62f6ce369bed1.gz
  • Loading branch information...
commit 909f844ba61ea1f417823f28da27cdc63645d0cb 1 parent a85c43e
@attila-lendvai attila-lendvai authored
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/strings.lisp
View
7 src/strings.lisp
@@ -265,7 +265,12 @@ shouldn't attempt to modify V."
encoding))
(bom (bom-vector encoding use-bom))
(bom-length (length bom))
- (result (make-array (+ (length string) bom-length)
+ ;; OPTIMIZE: we could use the (length string) information here
+ ;; because it's a simple-base-string where each character <= 127
+ (result (make-array (+ (the array-index
+ (funcall (the function (octet-counter mapping))
+ string start end -1))
+ bom-length)
:element-type '(unsigned-byte 8))))
(replace result bom)
(funcall (the function (encoder mapping))
Please sign in to comment.
Something went wrong with that request. Please try again.