From b879078d965c657eab92a016cc931bbc99ce234a Mon Sep 17 00:00:00 2001 From: Moskvitin Andrey Date: Wed, 24 Mar 2010 00:13:25 +0300 Subject: [PATCH] real fix bug in #'decode-escaped-encoding --- src.lisp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src.lisp b/src.lisp index ba471ca..3fc5c70 100644 --- a/src.lisp +++ b/src.lisp @@ -845,7 +845,13 @@ URI ~s contains illegal character ~s at position ~d." (= (sbit reserved-chars octet) 0)) (write-char ch out) (incf i - (* (if (> octet 127) 2 1) + (* (cond + ((< octet #x80) 1) + ((< octet #x800) 2) + ((< octet #x10000) 3) + ((< octet #x200000) 4) + ((< octet #x4000000) 5) + (t 6)) 3))) (t (write-string (subseq string i (+ i 3)) out) (incf i 3) -- 1.7.10.4