could somebody please comment whether I'm doing something wrong here?
o (setq custom:*foreign-encoding* charset:utf-16)
(def-call-out c-self (:name "ffi_identity")
(:arguments (first (c-array-ptr uint8)))
(:return-type c-string) (:language :stdc))
> (c-self #(#xfe #xff 0 #x41 0 0))
*** - Internal error: statement in file "stream.d", line 4074 has been
Please send the authors of the program a description how you produced
> (convert-string-to-bytes "A" charset:utf-16)
#(255 254 65 0)
> (c-self #(#xff #xfe 65 0 0 0))
*** - UNIX-Fehler 84 (EILSEQ): Ungultiges Multibyte-Zeichen
Same for (c-self #(#xff #xfe 65 0)) or even #(65 0)
[I thought I'd spend some time reviewing the non-1:1 encoding FFI changes which I had never done so far.]
Tested on my Ubuntu/Hoary/Debian libc6 x86 Linux box.