Hi! I was happily using BeautifulSoup and I'm also using a text file as input parameters of my Python script.
I then came across the famous "UnicodeEncodeError" error.
I've been reading questions here at SO but I'm still confused.
What does ASCII got to do with all of these? What encoding do I use on my text editor (Notepad++)? ANSI? UTF-8? Decoding a string to ASCII doesn't seem to always work (I'm guessing the string is in a different encoding coming from BeautifulSoup). How do I fix this?
Anyway any help and clarifications will be greatly appreciated.
Thanks!
edit: reading BeautifulSoup's docs, it says that it only uses unicode but I'm still getting Unicode errors :(
File "C:\Python26\lib\encodings\cp437.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u300d' in position
3: character maps to <undefined>