r10806: Automated commit for Debian build of puri upstream-version-1.3.1.3
[puri.git] / src.lisp
index ff4cd44b7c8dd9153f9d9d6a0909cd51cfd7c7f7..a189331f87b81e9c07d2460e10fb66d0751b2d93 100644 (file)
--- a/src.lisp
+++ b/src.lisp
 ;; Original version from ACL 6.1:
 ;; uri.cl,v 2.3.6.4.2.1 2001/08/09 17:42:39 layer
 ;;
-;; $Id: src.lisp,v 1.10 2003/07/20 21:03:54 kevin Exp $
+;; $Id$
 
 (defpackage #:puri
   (:use #:cl)
+  #-allegro (:nicknames #:net.uri)
   (:export
    #:uri                               ; the type and a function
    #:uri-p
@@ -899,6 +900,8 @@ URI ~s contains illegal character ~s at position ~d."
     (vector #\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9 #\a #\b #\c #\d #\e #\f))
 
 (defun encode-escaped-encoding (string reserved-chars escape)
+  (unless (typep string 'simple-string)
+    (setq string (coerce string 'simple-string)))
   (when (null escape) (return-from encode-escaped-encoding string))
   ;; Make a string as big as it possibly needs to be (3 times the original
   ;; size), and truncate it at the end.