[Product-Developers] Re: UnicodeDecodeError

Walter Cruz waltercruz at threepointsweb.com
Tue Mar 25 12:37:04 UTC 2008


>  > 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.



-- 
Atenciosamente

Walter Rodrigo de Sá Cruz
waltercruz at threepointsweb.com
http://www.threepointsweb.com
+55 61 3468-1604

Python, Zope e Plone


More information about the Product-Developers mailing list