Use character instead of byte strings

This commit is contained in:
Philipp Hagemeister 2012-11-26 04:23:20 +01:00
parent 7ec1a206ea
commit 92b91c1878
3 changed files with 54 additions and 48 deletions

View file

@ -26,6 +26,11 @@ std_headers = {
'Accept-Language': 'en-us,en;q=0.5',
}
try:
compat_str = unicode # Python 2
except NameError:
compat_str = str
def preferredencoding():
"""Get preferred encoding.