Tuesday, February 16, 2010

Programmer - Changing default encoding of python ?

Programmer Question

I have many "can't encode" and "can't decode" problems with python when I run my applications from console. But in Eclipse Pydev IDE, default character encoding is set to utf-8 and I'm fine.



I searched around for setting default encoding, and people say that python deletes the sys.setdefaultencoding function on startup and we can not use it.



So whats the best solution for it ?

No comments:

Post a Comment

LinkWithin

Related Posts with Thumbnails