[issue4382] test_dbm_dumb fails due to character encoding issue on Mac OS X
Martina Oefelein
report at bugs.python.org
Fri Nov 21 23:28:45 CET 2008
Martina Oefelein <Martina at oefelein.de> added the comment:
The Mac Roman encoding comes into play, because _commit opens _dirfile
without explicitly specifying an encoding. io.open then gets the
encoding via locale.getpreferredencoding, which returns mac-roman:
Majestix:Python-3.0rc3 martina$
DYLD_FRAMEWORK_PATH=/Users/martina/Downloads/Python-3.0rc3: ./python.exe
-c "import locale;print(locale.getpreferredencoding())"
mac-roman
Two issues:
- since dumb.py handles encoding explicitly, shouldn't it specify the
encoding for _dirfile as well? (or use a binary file; but this could
cause new line-ending troubles...)
- is mac-roman really the appropriate choice for
locale.getpreferredencoding? This is on Mac OS X 10.5, not Mac OS 9...
The preferred encoding for Mac OS X should be utf-8, not some legacy
encoding...
Seems to be related to r67310, which was intended to fix issue #3799
http://svn.python.org/view/python/branches/py3k/Lib/dbm/dumb.py?
rev=67310&r1=63662&r2=67310
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue4382>
_______________________________________
More information about the Python-bugs-list
mailing list