On Mon, May 10, 2010 at 12:02 PM, Israel Ben Guilherme Fonseca
<israel....@gmail.com> wrote:
> Well, but now i have another problem: the console output is set to ascii,
> but the problem indeed is not the console output but the string encoding,
> look at this example with the US-ASCII set:
>
> print u"ã"
>
> I'm telling that my string is indeed a unicode literal, and it should work
> fine but now it gets an error. That's because the console can no longer show
> non-ascii output. And that same line of code work fine in the python
> interpreter, strange or not it does not with NetBeans IDE too. Is that right
> to work that way?


Unfortunately, the problem is that Python doesn't know how to deal
with a not tty process -- or if you see the other way, you can say
that java doesn't really emulate a shell. Please create a bug report
with that error so that I can take a look if there's some workaround
for it.

Cheers,

Fabio


> -----------------
>
> Portuguese Off-Topic: Apropósito, pude notar que se formasse na UFSC certo?
> Sou daqui da UNISUL de Tubarão, não tão longe de lá. :)

Pertinho mesmo... ja ta se formando? (me manda e-mail diretamente pra
nao ficar na lista).

>
> 2010/5/10 Fabio Zadrozny <fabi...@gmail.com>
>>
>> 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
>
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> Pydev-users mailing list
> Pydev-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pydev-users
>
>

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

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

Reply via email to