经过一些地理定位工作后,我正在使用 DictWriter 将字典写入 csv。
location = geolocator.reverse(coords)
row["address"] = location.address
writer.writerow(row)
这会产生:
File "C:\bin64\python\3.4.3\lib\encodings\cp1252.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u200e' in
position 118: character maps to <undefined>