UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb6 in position 0: invalid start byte

Ferrous Cranus nikos at superhost.gr
Thu Jul 4 16:25:15 EDT 2013


Στις 4/7/2013 11:08 μμ, ο/η Dennis Lee Bieber έγραψε:
> On Thu, 04 Jul 2013 13:38:09 +0300, ????? <nikos at superhost.gr> declaimed
> the following:
>
>> What character is 0xb6 anyways?
>>
> 	It depends on the encoding... In EBCDIC it's unassigned. It's a
> paragraph mark in ISO-Latin-1 (ISO-8859-1). Apparently also a paragraph
> mark in ISO-Latin-9 (ISO-8859-15).
>
> 	If it is valid in UTF-8, I can't find a reference. It's not a prefix
> for a multi-byte character, which implies that the previous byte should
> have been something in prefix or another extended byte entry...

try:
	host = socket.gethostbyaddr( os.environ['REMOTE_ADDR'] )[0]
except:
	host = "Reverse DNS Failed"

Is there a way to write the above so i cna print the error return when 
it fails?

-- 
What is now proved was at first only imagined!



More information about the Python-list mailing list