On Mon, May 10, 2010 at 9:35 AM, Israel Ben Guilherme Fonseca
<israel....@gmail.com> wrote:
> Hi,
>
> I read in the past emails about encoding problems with pydev, but no one
> gave me final answer about this. I have the following premise:
>
> If i execute this in the shell python interpreter:
>
> unicode("ã")
>
> I got (correctly) the following error:
>
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xe3 in position 0:
> ordinal not in range(128)
>
> Python decode strings in ascii by default. But if i do the exactly same
> thing in pydev, i don't get an error but instead the string is converted
> successfully. And that's a VERY bad thing.
>
> I did the same test in the Netbeans IDE for Python and it did work as
> expected throwing the ascii decode error. Is it really a pydev bug? I think
> that pydev is messing with default encoding used by python (as the other
> users said about site.py) or something like that.
>
> I'm using Ubuntu 8.10 with Python 2.4.5.

You have to set the encoding you want to use in the run configuration:
Run > Run Configurations > and in the common tab select the encoding
to be US-ASCII.

Cheers,

Fabio

------------------------------------------------------------------------------

_______________________________________________
Pydev-users mailing list
Pydev-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pydev-users

Reply via email to