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 brett.cannon
Recipients barry, brett.cannon, christian.heimes, gvanrossum, jcea, vstinner
Date 2008-11-19.23:33:55
SpamBayes Score 1.6973275e-09
Marked as misclassified No
Message-id <1227137638.76.0.0845670368387.issue3799@psf.upfronthosting.co.za>
In-reply-to
Content
If you look at the 2.7 code all it requires of keys and values in
__setitem__ is that they are strings; there is nothing about Latin-1 in
terms of specific encoding (must be a 3.0 addition to make the
str/unicode transition the easiest). That would suggest to me that
assuming that previous DBs were written in Latin-1 is somewhat bogus as
people could have passed in any str encoded in any format as a DB key or
value.

Thus I think going down the UTF-8 route is the right thing to do for
string arguments. A quick look at _gdbmmodule.c supports this as it just
converts its arguments through PyArg_Parse("s#") to get its keys and
thus uses UTF-8 as the default encoding.
History
Date User Action Args
2008-11-19 23:33:58brett.cannonsetrecipients: + brett.cannon, gvanrossum, barry, jcea, vstinner, christian.heimes
2008-11-19 23:33:58brett.cannonsetmessageid: <1227137638.76.0.0845670368387.issue3799@psf.upfronthosting.co.za>
2008-11-19 23:33:56brett.cannonlinkissue3799 messages
2008-11-19 23:33:55brett.cannoncreate