Python 2 Linux Windows ( , , ). Python 3, , .
: Unicode, , ASCII. Python 2 u ( Python 3 u , ):
url = u"http://translate.google.com/translate_tts?tl=zh-CN&q=老師"
( ):
url_2 = u"http://translate.google.com/translate_tts?tl=zh-CN&q=\u8001\u5e2b"
UTF-8 requests, , UTF-8.
, sys.getdefaultencoding(), , , "ascii", , Mac Linux, . Windows "cp1252" "big5" , mojibake.
. , , UTF-8 Mac, - , "eh eh eh" Linux ( , , 老 U + 00E8, U + 0080, U + 0081?), - , , Windows.
url_2, : 2.x, Unicode, \u8001 escape-, , u, 8, 0, 0 , 1 . Which request` Google, , -, .
u, , .
Python 3 u . (, 3.x b... , -, , , UTF-8 3.x, Big5, mojibakes UTF-8 sys.getdefaultencoding .)
, - , .