]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - doc/bugs/crashes_in_the_python_proxy_even_if_disabled.mdwn
(no commit message)
[git.ikiwiki.info.git] / doc / bugs / crashes_in_the_python_proxy_even_if_disabled.mdwn
index 4e54e5df47caad7b71e8c5fb5d9cdd549ef1e0f8..26896b303cba65d21c00e372151a75d055c77a14 100644 (file)
@@ -50,3 +50,12 @@ error: ikiwiki failed
 >     $
 > 
 > 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]]