using #\DOUBLE_LOW-9_QUATATION_MARK in Url crashes Drakma #29

simkoc opened this Issue Jun 2, 2013 · 1 comment


None yet
2 participants

simkoc commented Jun 2, 2013

I encountered an error caused by non-Latin-1 characters used in a given url using sbcl e.g.:

(drakma:http-request "„weird-url")

debugger invoked on a FLEXI-STREAMS:EXTERNAL-FORMAT-ENCODING-ERROR       in thread
#<THREAD "initial thread" RUNNING {1002998D23}>:
#\DOUBLE_LOW-9_QUOTATION_MARK (code 8222) is not a LATIN-1 character.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
  0: [ABORT] Exit debugger, returning to top level.

 "~S (code ~A) is not a LATIN-1 character."

I am using Drakma 1.3.0 // SBCL 1.0.55 // flexis-streams 1.07

As a quickfix I replaced all +latin-1+ in "request.lisp" with (make-external-format :utf-8) but I doubt that this is a valid solution, as the +latin-1+ was chosen for a reason?


hanshuebner commented Jun 2, 2013

The encoding for headers is specified and requests is defined to be LATIN1 as per RFC2616. You need to properly encode your URL according to the rules of the server that you're talking to, for example using URL encoding UTF-8.

hanshuebner closed this Jun 2, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment