Lino Website

Problem reports

UnicodeEncodeError

Sunday, 13. August 2006 06:28.

diag.py continues to produce UnicodeEncodeError on the DOS box of Mare's PC which has the codepage 1257.

c:\svnwork\lino\trunk>lino diag
Lino/diag
Homepage: http://lino.saffre-rumma.ee/diag.html
Copyright (c) 2005-2006 Luc Saffre.
This software comes with ABSOLUTELY NO WARRANTY and is
distributed under the terms of the GNU General Public License.
See file COPYING.txt for more information.
Using Lino 0.6.18, Python 2.4.3 final
Traceback (most recent call last):
  File "", line 1, in ?
  File "C:\svnwork\lino\trunk\src\lino\runscript.py", line 81, in ?
    m.main()
  File "C:\svnwork\lino\trunk\src\lino\scripts\diag.py", line 108, in main
    Diag().main()
  File "C:\svnwork\lino\trunk\src\lino\console\application.py", line 189, in main
    return self.run(*args,**kw)
  File "C:\svnwork\lino\trunk\src\lino\scripts\diag.py", line 103, in run
    diag_encoding(self.toolkit.stdout)
  File "C:\svnwork\lino\trunk\src\lino\scripts\diag.py", line 28, in
diag_encoding
    out.write(u"""
  File "C:\svnwork\lino\trunk\src\lino\console\console.py", line 62, in write
    data,consumed = self.decode(object,self.errors)
  File "c:\Python24\lib\encodings\cp1257.py", line 22, in decode
    return codecs.charmap_decode(input,errors,decoding_map)
  File "c:\Python24\lib\encodings\cp1257.py", line 18, in encode
    return codecs.charmap_encode(input,errors,encoding_map)
UnicodeEncodeError: 'charmap' codec can't encode character u'\xe8' in position 89: character maps to <undefined>

This is caused by the rewriter() function in console.py.

Refering articles:

Copyright 2001-2007 Luc Saffre.
http://lino.saffre-rumma.ee
Generated 2007-06-07 16:22:48