gh-122996: Clarify encoding behavior in dbm module documentation#138030
gh-122996: Clarify encoding behavior in dbm module documentation#138030furkanonder wants to merge 1 commit intopython:mainfrom
Conversation
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I thought UTF-8 is always used. What backends use different encoding?
Yes, |
|
If this is so, then I think that this is a bug in the SQLite backend. The main data type is binary, setting string key and value is acceptable (for compatibility with Python 2), but you get bytes objects when read them back, and their values should be predicable and backend-independent. I think we can live with a difference in handling surrogate characters. |
📚 Documentation preview 📚: https://cpython-previews--138030.org.readthedocs.build/