[Bese-devel] mistake in recent patch

Matthew Danish mdanish at andrew.cmu.edu
Thu Feb 16 00:47:11 UTC 2006


[utf-8 for url
henrik.hjelte at poboxes.com**20060208091726] {
hunk ./src/backend/common.lisp 91
-         (unescaped-key (unescape-as-uri key))
-         (unescaped-value (unescape-as-uri value)))
+         (unescaped-key (unescape-as-uri key (external-format-for :url)))
+         (unescaped-value (unescape-as-uri value (external-format-for :url))))
hunk ./src/vars.lisp 13
-(defvar *external-formats* '(:url :latin-1
+(defconstant +default-encoding-for-uri+ :utf-8
+  "UTF-8 is the semi-standard encoding for URL:s
+ RFC 2396 does not specify how multi-byte characters are encoded, but mentions UTF-8 as an example.
+ RFC 2718 Strongly recommends UTF-8 for new URI-schemes.
+ RFC 3987 The IRI (International Resource Identifier) proposed standard specifies UTF-8.
+ The Javascript ECMA standard specifies that the conversion functions (EncodeURI et al.) use UTF-8,
+ http://www.ecma-international.org/publications/files/ecma-st/ECMA-262.pdf
+")
+
+(defvar *external-formats* '(:url +default-encoding-for-uri+
}


Notice on the last line that it uses the symbol +default-encoding-for-uri+
instead of its value :utf-8.

This causes an error in SBCL because it attempts to find an external format
named, literally, "+default-encoding-for-uri+".

I changed it to `(:url ,+default-encoding-for-uri+ and it works.

-- 
;; Matthew Danish -- user: mrd domain: cmu.edu
;; OpenPGP public key: C24B6010 on keyring.debian.org



More information about the bese-devel mailing list