This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author oefe
Recipients brett.cannon, oefe
Date 2008-11-21.22:28:43
SpamBayes Score 1.7626904e-05
Marked as misclassified No
Message-id <[email protected]>
In-reply-to
Content
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
History
Date User Action Args
2008-11-21 22:28:45oefesetrecipients: + oefe, brett.cannon
2008-11-21 22:28:45oefesetmessageid: <[email protected]>
2008-11-21 22:28:44oefelinkissue4382 messages
2008-11-21 22:28:43oefecreate