Skip to content

babel octets to string: type error #19

@gihnius

Description

@gihnius
(defparameter b1 (babel:string-to-octets "string 1"))
(defparameter b2 (babel:string-to-octets "string 2"))
(defparameter delim (babel:string-to-octets "|"))
(defparameter b3 (concatenate 'vector b1 delim b2))

(babel:octets-to-string b3)
;; give this error message:

The value of VECTOR is #(115 116 114 105 110 103 32 49 124 115
                         116 114 105 110 103 32 50), which is not of type (VECTOR
                                                                           (UNSIGNED-BYTE
                                                                            8)).
[Condition of type SIMPLE-TYPE-ERROR]
----

but it's ok in flexi-streams and cl-base64
(flexi-streams:octets-to-string b3)
=> "string 1|string 2"
(cl-base64:base64-string-to-string (cl-base64:usb8-array-to-base64-string b3))
=> "string 1|string 2"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions