Fixed decode() for response of dmenu communicate() #2

Merged
merged 1 commit into from Apr 25, 2012

Projects

None yet

2 participants

@endreszabo
Contributor

UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 45: ordinal not in range(128)

Happens when there's a browser with github opened that has \xb7 in the title/caption that could not be decoded from utf-8 using 'ascii' codec.

@endreszabo endreszabo Fixed decode(), otherwise I've got:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 45: ordinal not in range(128)

when there was a browser with github opened that has \xb7 in the title/caption that was incorrectly decoded from utf-8.
a627a33
@ziberna
Owner
ziberna commented Apr 25, 2012

Good catch! I'm using Python 3 mostly, so I've kind of taken unicode strings for granted and didn't even think of the issue.

Thanks for the fix.

@ziberna ziberna merged commit f589a9e into ziberna:master Apr 25, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment