Character encoding & the copyright symbol
Robert Dailey
rcdailey at gmail.com
Thu Aug 6 12:14:08 EDT 2009
Hello,
I'm loading a file via open() in Python 3.1 and I'm getting the
following error when I try to print the contents of the file that I
obtained through a call to read():
UnicodeEncodeError: 'charmap' codec can't encode character '\xa9' in
position 1650: character maps to <undefined>
The file is defined as ASCII and the copyright symbol shows up just
fine in Notepad++. However, Python will not print this symbol. How can
I get this to work? And no, I won't replace it with "(c)". Thanks!
More information about the Python-list
mailing list