[Product-Developers] Re: UnicodeDecodeError
lists at zopyx.com
Mon Mar 24 19:34:36 UTC 2008
--On 24. März 2008 16:27:22 -0300 Derek Broughton <news at pointerstop.ca>
> Dirceu Pereira Tiegs wrote:
>> Em 24/03/2008, às 14:39, Walter Cruz escreveu:
>>>> I was with the same problem some months ago. One possible workaround
>>>> is to set the default encoding of your python environment to utf-8;
>>>> worked for me.
>>> Hi Dirceu! Yes, I can do it. But isn't a little hackish?
>> Yes, totally. :-)
>> Like I said, it's a workaround, not a fix. I didn't had the time to
>> look for a proper fix last time I used AGX (a couple of months ago).
> I'm not convinced it's "hackish" - one suspects that if you intend to use
> non-ascii characters on your site, python _should_ be set up for unicode -
> but I wish it was a little more obvious what is right (and more
> importantly if there are any python issues we're going to run into by
> changing the default - I would guess there's a reason why it ships
> without a unicode default).
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 194 bytes
Desc: not available
More information about the Product-Developers