Use character instead of byte strings
This commit is contained in:
parent
7ec1a206ea
commit
92b91c1878
3 changed files with 54 additions and 48 deletions
|
@ -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.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue