diff --git a/rol-uri.asd b/rol-uri.asd
index c1d89dc..0464ff2 100644
--- a/rol-uri.asd
+++ b/rol-uri.asd
@@ -28,7 +28,10 @@
:author "Thomas de Grivel <thomas@lowh.net>"
:version "0.1"
:description "String and URI library"
- :depends-on ("alexandria" "cl-unicode" "str" "trivial-utf-8")
+ :depends-on ("alexandria"
+ "babel"
+ "cl-unicode"
+ "str")
:components
((:file "package")
(:file "uri" :depends-on ("package"))
diff --git a/uri.lisp b/uri.lisp
index f30b30b..ec38b54 100644
--- a/uri.lisp
+++ b/uri.lisp
@@ -52,8 +52,9 @@
(with-output-to-string (s)
(%-encode-char c :stream s :reserved reserved))
(if (find c reserved)
- (let ((b (trivial-utf-8:string-to-utf-8-bytes
- (make-string 1 :initial-element c))))
+ (let ((b (babel:string-to-octets
+ (make-string 1 :initial-element c)
+ :encoding :utf-8)))
(dotimes (i (length b))
(write-char #\% stream)
(write (svref b i) :base 16 :case :upcase :stream stream)))
@@ -95,8 +96,9 @@
(eat (1+ i)))
(t
(%-encode-bytes
- (trivial-utf-8:string-to-utf-8-bytes
- (subseq string i (1+ i)))
+ (babel:string-to-octets
+ (subseq string i (1+ i))
+ :encoding :utf-8)
stream)
(eat (1+ i))))))
(if (null stream)