[issue23543] encoding error trying to save string to file
Rosa Maria
report at bugs.python.org
Fri Feb 27 22:13:19 CET 2015
New submission from Rosa Maria:
I made a program to read which files are in a windows folder, and saves in a file in order to print it, but when it tries to write in a file the following error appears:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2010' in position 8: character maps to <undefined>
I extpected that being Python-3 an utf8 native, I do'n have this problems.
I send the Python script and some examples of files to read.
One of the failures example is the file named:
'LKC.6558‐100‐HD‐P‐101_C.xlsx\n'
which appears in windows as:
'LKC
6558
100
HD
P
101_C.xlsx\n'
----------
components: Unicode
files: Redear_Carpetotas.py
messages: 236841
nosy: Gravitania, ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: encoding error trying to save string to file
type: crash
versions: Python 3.4
Added file: http://bugs.python.org/file38268/Redear_Carpetotas.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23543>
_______________________________________
More information about the Python-bugs-list
mailing list