Message76212
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 |
|
| Date |
User |
Action |
Args |
| 2008-11-21 22:28:45 | oefe | set | recipients:
+ oefe, brett.cannon |
| 2008-11-21 22:28:45 | oefe | set | messageid: <[email protected]> |
| 2008-11-21 22:28:44 | oefe | link | issue4382 messages |
| 2008-11-21 22:28:43 | oefe | create | |
|