[docs] NOT SAVE FILE OWING TO AN ENCODING ERROR

Rosa Maria rosemeer at yahoo.com.mx
Fri Feb 27 22:04:52 CET 2015


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.
   
   - "Que tengamos Sabiduría para no temer a las Sombras de la Noche"
   - "Cuídate de la Ciencia que no Llora, de la Filosofía que no Ríe y de la Grandeza que no se inclina ante los niños"
   - "Madre es el nombre de dios en los labios y en los corazones de todos los niños"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20150227/866c6f21/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LKC.6558u2010100u2010HDu2010Pu2010118_C.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 911221 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20150227/866c6f21/attachment-0003.xlsx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LKC.6558u2010100u2010HDu2010Pu2010119_C.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 921091 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20150227/866c6f21/attachment-0004.xlsx>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: LKC.6558u2010100u2010HDu2010Pu2010123_C.xlsx
Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
Size: 895532 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/docs/attachments/20150227/866c6f21/attachment-0005.xlsx>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Redear_Carpetotas.py
URL: <http://mail.python.org/pipermail/docs/attachments/20150227/866c6f21/attachment-0001.ksh>


More information about the docs mailing list