[Python-Dev] Divorcing str and unicode (no more implicit conversions).
srichter at cosmos.phy.tufts.edu
Mon Oct 24 02:52:27 CEST 2005
On Sunday 23 October 2005 18:10, Jason Orendorff wrote:
> -1 on keeping the source encoding of string literals. Python should
> definitely decode them at compile time.
> -1 on decoding implicitly "as needed". This causes decoding to happen
> late, in unpredictable places. Decodes can fail; they should happen
> as early and as close to the data source as possible.
+1. We have followed this last practice throughout Zope 3 successfully. In our
case, the publisher framework (in other words the output-protocol-specific
layer) is responsible for the decoding and encoding of input and output
streams, respectively. We have been pretty much free of any encoding/decoding
troubles since. Having our application only use unicode internally was one of
the best decisions we have made.
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Python-Dev