[Zope3-dev] test errors due to ascii defaultencoding assumption
Dieter Maurer
dieter at handshake.de
Sat Oct 22 13:24:20 EDT 2005
Jim Fulton wrote at 2005-10-21 15:42 -0400:
> ...
[Tim]
>>>I'm sure sys.setdefaultencoding will vanish in a future Python
>>>release, since it wasn't intended to persist beyond initial
>>>development to begin with.
[DM]
>> Hopefully only after Python cleaned up the separation
>> between text and binary strings.
[Jim]
>This is really an application problem.
> Applications should
>not mix strings and unicode.
>With a little discipline, this is
>easier to do than one might expect.
The many problem reports about "UnicodeDecodingError"s
seem to indicate that it is not easy:
Many components (some in the Python Runtime Library, too)
do not expect to work with Unicode and expect/return "str"s.
And Python does not yet have a binary string type.
I defined my own one to overcome XML-RPC/SOAP problems
(which distinguish between binary content and text while Python does
not). But, this is an isolated solution.
> ...
>Well, you shouldn't need to do this for Zope 3.
Yes, I saw few "UnicodeDecodingError"s problem reports for Zope 3.
> At some point,
>we need to figure out how to clean this up for Zope 2.
This world is full of them...
--
Dieter
More information about the Zope3-dev
mailing list