python33, windows, UnicodeEncodeError: 'charmap' codec can't encode characters in position, to print out the file contents to stdout,
gintare
g.statkute at gmail.com
Sun Jul 6 05:05:10 EDT 2014
The answer is on page:https://docs.python.org/3.3/howto/unicode.html#reading-and-writing-unicode-data
The correct code:
f=open('C:\Python33\Scripts\lang\langu\svtxt.txt','r', encoding='utf-8')
linef=f.readlines()
print(repr(linef))
More information about the Python-list
mailing list