citeproc-py icon indicating copy to clipboard operation
citeproc-py copied to clipboard

UnicodeEncodeError: 'charmap' codec can't encode character '\u2013' in position 90: character maps to <undefined>

Open NoxCreation opened this issue 7 years ago • 1 comments

When it performs the Parser by a JSON structure where the type is "article-journal" when iterar:

for item in bibliography.bibliography():
    print(item)

Return the error:

Traceback (most recent call last):
  File "bibliografia.py", line 62, in <module>
    print(item)
  File "C:\Anaconda3\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 '\u2013' in position 90: character maps to <undefined>

NoxCreation avatar Dec 26 '18 17:12 NoxCreation

This does not look like an issue with citeproc-py, but rather with unicode in a Windows environment. I remember that this can be quite confusing, but I don't know the details depending on the Python version you're running. You can try these resources:

Let me know if you've been able to solve the issue.

brechtm avatar Jan 18 '19 10:01 brechtm