Python usage numbers
alister.ware at ntlworld.com
Sun Feb 12 19:55:50 CET 2012
On Sun, 12 Feb 2012 12:11:01 +0000, Mark Lawrence wrote:
> On 12/02/2012 08:26, Matej Cepl wrote:
>> On 12.2.2012 09:14, Matej Cepl wrote:
>>>> Obvious answers:
>>>> - Try decoding with UTF8 or Latin1. Even if you don't get the right
>>>> characters, you'll get *something*.
>>>> - Use open(filename, encoding='ascii', errors='surrogateescape')
>>>> (Or possibly errors='ignore'.)
>>> These are not good answer, IMHO. The only answer I can think of,
>> Slightly less flameish answer to the question “What should I do,
>> really?” is a tough one: all these suggested answers are bad because
>> they don’t deal with the fact, that your input data are obviously
>> broken. The rest is just pure GIGO … without fixing (and I mean,
>> fixing, not ignoring the problem, which is what the previous answers
>> suggest) your input, you’ll get garbage on output. And you should be
>> thankful to py3k that it shown the issue to you.
>> BTW, can you display the following line?
>> Příliš žluťoučký kůň úpěl ďábelské ódy.
> Yes in Thunderbird, Notepad, Wordpad and Notepad++ on Windows Vista,
> can't be bothered to try any other apps.
Pan seems to be fine , they at least look like letters not just blocks
Appearances often are deceiving.
More information about the Python-list