F
feedthetroll
Am Freitag, 5. Juli 2013 12:33:05 UTC+2 schrieb Îίκος Gr33k:
Wait!
I get a decode error when python tries to automatically decode a bytestring
assuming it to be utf-8 encoded.
I am sure the error will disappear, when I try to decode it explicit using
utf-8. Heureka! I got it!
Or in other words:
If a big stone falls on my foot accidently, it hurts.
------------------------------------------^
But I am sure it will not hurt, if take that same stone and throw it on my foot.
Heureka! I got it!
P.S.:
Am 14.06.2013 10:35, schrieb Fábio Santos:
...
Wait!
Are you saying that the ip address is being returned as a byte string
which then i have to decode with something like:
host = socket.gethostbyaddr( os.environ['REMOTE_HOST'].decode('utf-8') )[0]
Wait!
I get a decode error when python tries to automatically decode a bytestring
assuming it to be utf-8 encoded.
I am sure the error will disappear, when I try to decode it explicit using
utf-8. Heureka! I got it!
Or in other words:
If a big stone falls on my foot accidently, it hurts.
------------------------------------------^
But I am sure it will not hurt, if take that same stone and throw it on my foot.
Heureka! I got it!
P.S.:
Am 14.06.2013 10:35, schrieb Fábio Santos: