#9814: Python 2.6's sqlite refuses 8-bit SafeStrings
---------------------------------------------------+------------------------
Reporter: kmtracey | Owner: nobody
Status: new | Milestone:
Component: Database layer (models, ORM) | Version: 1.0
Resolution: | Keywords:
Stage: Unreviewed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------------+------------------------
Comment (by kmtracey):
Trying `Database.register_adapter(SafeString, lambda s:str(s))` doesn't
work. I'm thinking it doesn't then go through the registered adapters
again and see that `str`'s have their own adapter (which does a utf-8
decode)?
It has no problem with `SafeUnicode`, apparently, since a couple of lines
prior to the test line that is causing the current failure is saving of a
field set to a `SafeUnicode` value. It may be just when it is searching
through adapters that it isn't really matching properly (we don't have to
register an adapter for unicode). I'll look at it again when I'm more
awake in the AM.
--
Ticket URL: <http://code.djangoproject.com/ticket/9814#comment:2>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---