Problem with character encoding in commandline
"sandrodll[remove]" at googlemail.com
Thu Oct 15 18:54:59 CEST 2009
I have a strange problem that I am not able to solve myself.
I have written a little Python script to download image from last.fm,
now, if I call it from the python environment it works, if I call it
from Windows console it doesn't works
If I open the prompt and run python I call the function:
(the code is at the end of message)
>>> lastfm.decodeArgs("é") (e acute è in html)
I obtain this result:
that is the correct output.
if I open the windows console (cmd) without enter in Python envinroment,
and I call script from commandline:
the result is:
that is not the same and I don't understand the reason.
If I give the command : chcp from console I have:
Active code page: 850
the same code table that I see using the sys.stdin.encoding inside
Someone know where I make wrong ?
My code (only the parts that not works)
from urllib import quote_plus
if __name__ == '__main__':
*gialloporpora: Alex Faaborg - » Browsing Your Personal Web
http://ff.im/9JDwm * - http://sn.im/shv8b
*Massimo Bubola - Cuori Ribelli * - http://sn.im/sivjx
* FAQ* di /it-alt.comp.software.mozilla/: http://bit.ly/1MZ04d
More information about the Python-list