]> sipb.mit.edu Git - ikiwiki.git/blobdiff - doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn
i have a patch for this now
[ikiwiki.git] / doc / bugs / crashes_in_the_python_proxy_even_if_disabled.mdwn
index 4e54e5df47caad7b71e8c5fb5d9cdd549ef1e0f8..bbaa53658f1b534e8b7123ce9d900b6d9f8c38cb 100644 (file)
@@ -1,3 +1,5 @@
+[[!template  id=gitbranch branch=anarcat/dev/proxy-utf8-fail author="[[anarcat]]"]]
+
 ikiwiki 3.20130904.1~bpo70+1
 
 rebuilding the whole wiki:
 ikiwiki 3.20130904.1~bpo70+1
 
 rebuilding the whole wiki:
@@ -50,3 +52,16 @@ error: ikiwiki failed
 >     $
 > 
 > So I am not sure what is going on here... --[[anarcat]]
 >     $
 > 
 > So I am not sure what is going on here... --[[anarcat]]
+
+>> Python is decoding what it receives from IkiWiki using the default `ascii`
+>> codec. To match IkiWiki's "all source text is UTF-8" assumption, the
+>> Python proxy should explicitly decode incoming text from bytes
+>> (`str`) to `unicode` using the `utf8` codec instead.
+>>
+>> Python's conservative default is "`ascii`, regardless of locale" -
+>> this minimizes the chance of silently incorrect decoding, but
+>> unfortunately also maximizes the chance of crashing. --[[smcv]]
+
+> > > Right, I know that. The trick is to find the rabbit hole. :P
+> > > 
+> > > And I found it. With my dev/proxy-utf8-fail, this doesn't fail anymore. Yay, a [[patch]] ready for commit! --[[anarcat]]