I am receiving the below error with the dash character "-"
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2013' in position 38: ordinal not in range(128) I have tried using the following: skills.encode('utf-8') but I still get the error. Below is my code in which I am trying to write to csv.
writer.writerow([name.encode('utf-8'), heading.encode('utf-8'), location.encode('utf-8'), education.encode('utf-8'), summary, currentRole, allRoles, companiesFollowed, groups, skills.encode('utf-8')])
-dash, but an n-dash fileformat.info/info/unicode/char/2013/index.htm. Yeah you can't represent that in ASCII. What would you like to be there instead?encodes). If you don't, you'll have to learn a whole lot more than you know now about Unicode and what a Unicode code point means. I'm not aware of any function that can just know that you want an n-dash to be a hyphen. You could make your own string replacement usingstring.maketransandstr.translatebut that's about it.