[Product-Developers] Re: UnicodeDecodeError

Andreas Jung lists at zopyx.com
Tue Mar 25 12:47:05 UTC 2008



--On 25. März 2008 09:37:04 -0300 Walter Cruz 
<waltercruz at threepointsweb.com> wrote:

>>  > 2008/3/24, Andreas Jung <lists at zopyx.com>:
>>  >
>>  >
>>  >> What are you talking about? Python has nothing like a 'unicode'
>>  >> default. Likely you're referring to sys.getdefaultencoding() which
>>  >>  is ascii by default. General rule #1: don't touch that. Rule #2: if
>>  >>  you have the need to touch the default encoding as a workaround:
>>  >>  better fix your code first.
>>  >>
>>  >>
>>  >>  -aj
>>  >
>>  > Yes. It's a common practice to set the default encoding of python to
>>  > utf8 (sitecustomize.py). At least for plone developers that go beyond
>>  > the ascii :)
>>
>>
>> If you do that then you don't know what your doing. Sorry for being harsh
>>  :-) If you write software depending on a particular default encoding
>>  != ascii then you should learn how to write proper plone code. No Plone
>>  application should depend on a particular default encoding other than
>>  ascii. And in general there is absolutely no need for changing the
>>  default encoding for Plone - except for using badly written code
>>  causing unicode errors
>>  for whatever reason. Setting the default encoding is just a _very dirty_
>>  workaround. Don#t call it bad practice. Any software depending on a
>>  particular default encoding other than ascii belongs into the trashcan.
>>
>
>
> Hi Andreas. I'm convinced that change the system default encoding is
> bad, you can't scary me more :)
>
> So, look that Archetypes have a real problem here. There's some way to
> us help it to amke it better? I will make the bugreport.
>

I have no problem with AT and Plone and Unicode since at least Plone 2.5+
 - except with badly written 3rd-party products. This does not mean that 
some Plone code might raise error caused by improper use of API or with bad 
3rd party code (e.g. accessing or modifying content objects directly 
instead of using the accessor/mutator methods).

Andreas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-product-developers/attachments/20080325/85d58633/attachment.asc>


More information about the Product-Developers mailing list