I'm using leo with the koi8-r locale.
When I run the leo tests, two of them fail.
Here is the relevant log part from the console:
--- cut here ---
ERROR: @test can't open message in g.openWithFileName

----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadow/leo/leo-current/leo/core/leoTest.py", line 185,
in runTest
    exec(script,d)
  File "<string>", line 8, in <module>
  File "/home/shadow/leo/leo-current/leo/core/leoGlobals.py", line
2377, in openWithFileName
    isLeo,fn,relFn = g.mungeFileName(fileName)
  File "/home/shadow/leo/leo-current/leo/core/leoGlobals.py", line
2481, in mungeFileName
    isZipped = fn and zipfile.is_zipfile(fn)
  File "/usr/lib/python2.6/zipfile.py", line 134, in is_zipfile
    fpin = open(filename, "rb")
  File "/usr/lib/python2.6/encodings/koi8_r.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u1fb9'
in position 42: character maps to <undefined>

======================================================================
ERROR: @test open non-existent non-ascii directory

----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/shadow/leo/leo-current/leo/core/leoTest.py", line 185,
in runTest
    exec(script,d)
  File "<string>", line 15, in <module>
  File "/home/shadow/leo/leo-current/leo/core/leoGlobals.py", line
2377, in openWithFileName
    isLeo,fn,relFn = g.mungeFileName(fileName)
  File "/home/shadow/leo/leo-current/leo/core/leoGlobals.py", line
2481, in mungeFileName
    isZipped = fn and zipfile.is_zipfile(fn)
  File "/usr/lib/python2.6/zipfile.py", line 134, in is_zipfile
    fpin = open(filename, "rb")
  File "/usr/lib/python2.6/encodings/koi8_r.py", line 12, in encode
    return codecs.charmap_encode(input,errors,encoding_table)
UnicodeEncodeError: 'charmap' codec can't encode character u'\u1ed6'
in position 38: character maps to <undefined>
--- cut here ---


You might want to do an additional check in these tests and eventually
wrap
the g.openWithFileName() in try/except blocks if leo is being run with
a non-utf
locale in order to silence these tracebacks.
I don't fully understand all the implications, but perhaps these two
tests can
even be skipped if a non-utf locale is involved?

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to