jdunck / python-unicodecsv

Python2's stdlib csv module is nice, but it doesn't support unicode. This module is a drop-in replacement which *does*. If you prefer python 3's semantics but need support in py2, you probably want https://github.com/ryanhiebert/backports.csv
Other
595 stars 90 forks source link

problem in encode string #83

Closed MotiBaadror closed 6 years ago

MotiBaadror commented 6 years ago
>>> yelp_soup=BeautifulSoup(yelp_r.text,'html.parser')
>>> print(yelp_soup.prettify())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Python34\lib\encodings\cp437.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode character '\u2019' in position 33349: character maps to <undefined>
>>>
ryanhiebert commented 6 years ago

I don't understand what this has to do with python-unicodecsv. The error looks like it's coming up from calling a BeautifulSoup function.

Closing because of that, but I'll be listening if you tell me I'm wrong.