[hunchentoot-devel] url-decode with Unicode text

Andrei Stebakov lispercat at gmail.com
Tue Sep 2 22:27:16 UTC 2008


Let's say I have some Greek text in the url, which is encoded in utf-8. The
string is "ελληνική".
When the ht server receives the request with the string, it goes to
url-decode with fails with the message:
junk in string "%u03B5%u03BB%u03BB%u03B7%u03BD%u03B9%u03BA%u03AE"
   [Condition of type SB-INT:SIMPLE-PARSE-ERROR]

It can be reproduced by evaluating:
(HUNCHENTOOT:URL-DECODE "%u03B5%u03BB%u03BB%u03B7%u03BD%u03B9%u03BA%u03AE"
(flex:make-external-format :utf-8 :eol-style :lf))

Backtrace:
  0: (PARSE-INTEGER
"%u03B5%u03BB%u03BB%u03B7%u03BD%u03B9%u03BA%u03AE")[:EXTERNAL]
  1: (URL-DECODE
      "%u03B5%u03BB%u03BB%u03B7%u03BD%u03B9%u03BA%u03AE"
      #<FLEXI-STREAMS::FLEXI-UTF-8-FORMAT (:UTF-8 :EOL-STYLE
                                           :LF) {18422651}>)

How can I decode Greek (or any other for that matter) text? I took Greek as
an example as Latin/German text worked.

Thank you,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/tbnl-devel/attachments/20080902/f5be90d7/attachment.html>


More information about the Tbnl-devel mailing list