I apologise for taking so long to reply, but you are getting the support you paid for

Firstly I must point out that you didn't do what I asked - post the result of:
- Code: Select all
(map 'vector #'char-code s)
But what you did post mostly confirmed my suspicions:
- A SIMPLE-BASE-STRING is a BASE-STRING
- A BASE-STRING contains BASE-CHARACTERs
- A BASE-CHARACTER is 8-bit
- -> multi-byte unicode code points can't fit in one BASE-CHARACTER
The last thing that it would confirm is that lispworks is keeping your string as utf-8, if that's true, then you can do (modulo lispworks having completely neutered unicode support somehow):
- Code: Select all
(defun lispworks-is-dumb (s)
(if (typep s 'base-string)
(babel:octets-to-string (map 'vector #'char-code s))
s))