#3454: sqlite backend is using row_factory when it should be using text_factory
--------------------------------------------------+-------------------------
Reporter: Brian Harring <[EMAIL PROTECTED]> | Owner:
adrian
Status: new | Component:
Database wrapper
Version: SVN | Resolution:
Keywords: | Stage:
Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 1
--------------------------------------------------+-------------------------
Changes (by mtredinnick):
* needs_better_patch: 0 => 1
* stage: Design decision needed => Accepted
Comment:
I don't think the use of {{{decode()}}} in this patch is correct.
{{{s.decode('utf-8')}}} is for converting a UTF-8 encoded string into a
unicode object, but I suspect you want to be converting unicode objects
into UTF-8 for storage purposes (that was what we were doing previously).
We cannot bypass the encoding step entirely, because there is no guarantee
at all that internal strings will be UTF-8 encoded streams of bytes (or
immediately convertible to such by Python). We are going to move to
unicode everywhere outside of the internal/external interfaces (which will
be conversion points), but that hasn't happened yet.
Other than that, the motivation behind the patch looks like a good find.
Thanks.
--
Ticket URL: <http://code.djangoproject.com/ticket/3454#comment:2>
Django Code <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
-~----------~----~----~----~------~----~------~--~---