[babel-devel] question about #\Nul char and Unicode

Luís Oliveira luismbo at gmail.com
Wed Aug 4 19:02:48 UTC 2010


On Wed, Aug 4, 2010 at 3:07 PM, Vsevolod Dyomkin <vseloved at gmail.com> wrote:
> Maybe, someone here can explain, why this 0-characters are not recognized as
> proper utf-8 ones?

Seems to work for me. Can you come up with a short reproducible example?

CL-USER> (defparameter *array* #(#\5 #\4 #\c #\6 #\7 #\5 #\5 #\b #\-
#\9 #\6 #\2 #\8 #\- #\4 #\0 #\a #\4 #\- #\9 #\a #\2 #\d #\- #\c #\c
#\8 #\2 #\a #\8 #\1 #\6 #\3 #\4 #\5 #\e #\  #\1 #\8 #\  #\/ #\h #\a
#\n #\d #\l #\e #\r #\t #\e #\s #\t #\  #\2 #\6 #\0 #\Space #\{ #\"
#\P #\A #\T #\H #\" #\Space #\" #\/ #\h #\a #\n #\d #\l #\e #\r #\t
#\e #\s #\t #\" #\, #\" #\M #\E #\T #\H #\O #\D #\" #\Space #\" #\G
#\E #\T #\" #\, #\" #\V #\E #\R #\S #\I #\O #\N #\" #\Space #\" #\H
#\T #\T #\P #\/ #\1 #\. #\1 #\" #\, #\" #\U #\R #\I #\" #\Space #\"
#\/ #\h #\a #\n #\d #\l #\e #\r #\t #\e #\s #\t #\" #\, #\" #\P #\A
#\T #\T #\E #\R #\N #\" #\Space #\" #\/ #\h #\a #\n #\d #\l #\e #\r
#\t #\e #\s #\t #\" #\, #\" #\A #\c #\c #\e #\p #\t #\" #\Space #\"
#\* #\/ #\* #\" #\, #\" #\H #\o #\s #\t #\" #\Space #\" #\l #\o #\c
#\a #\l #\h #\o #\s #\t #\Space #\6 #\7 #\6 #\7 #\" #\, #\" #\U #\s
#\e #\r #\- #\A #\g #\e #\n #\t #\" #\Space #\" #\c #\u #\r #\l #\/
#\7 #\. #\2 #\0 #\. #\0 #\  #\( #\i #\4 #\8 #\6 #\- #\p #\c #\- #\l
#\i #\n #\u #\x #\- #\g #\n #\u #\) #\  #\l #\i #\b #\c #\u #\r #\l
#\/ #\7 #\. #\2 #\0 #\. #\0 #\  #\O #\p #\e #\n #\S #\S #\L #\/ #\0
#\. #\9 #\. #\8 #\n #\  #\z #\l #\i #\b #\/ #\1 #\. #\2 #\. #\3 #\.
#\4 #\  #\l #\i #\b #\i #\d #\n #\/ #\1 #\. #\1 #\5 #\  #\l #\i #\b
#\s #\s #\h #\2 #\/ #\1 #\. #\2 #\. #\4 #\" #\} #\, #\0 #\Space #\,
#\n #\S #\S #\L #\/ #\0 #\. #\Nul #\Nul))
*ARRAY*
CL-USER> (cffi:with-foreign-string (fs (coerce *array* 'string)
:encoding :utf-8)
           (cffi:foreign-string-to-lisp fs :encoding :utf-8))
"54c6755b-9628-40a4-9a2d-cc82a816345e 18 /handlertest 260 {\"PATH\"
\"/handlertest\",\"METHOD\" \"GET\",\"VERSION\" \"HTTP/1.1\",\"URI\"
\"/handlertest\",\"PATTERN\" \"/handlertest\",\"Accept\"
\"*/*\",\"Host\" \"localhost 6767\",\"User-Agent\" \"curl/7.20.0
(i486-pc-linux-gnu) libcurl/7.20.0 OpenSSL/0.9.8n zlib/1.2.3.4
libidn/1.15 libssh2/1.2.4\"},0 ,nSSL/0."
328

Thanks,

-- 
Luís Oliveira
http://r42.eu/~luis/




More information about the babel-devel mailing list