url='aa'
print type(url)
print url.encode('utf8')
以上是ok的
keyword="中国"
print keyword.encode("utf8")
就会报错了
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)
print type(url)
print url.encode('utf8')
以上是ok的
keyword="中国"
print keyword.encode("utf8")
就会报错了
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe4 in position 0: ordinal not in range(128)