#5135: Unicode-branch merge broke insertion of binary data
--------------------------------------+-------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: adrian
Status: closed | Component: Database wrapper
Version: SVN | Resolution: wontfix
Keywords: binary blob unicode | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------------------+-------------------------------------
Changes (by mtredinnick):
* status: new => closed
* resolution: => wontfix
Comment:
Storing binary data was unsafe before (what if your binary data contained
a zero byte?), so it was kind of lucky -- and unsupported -- that it
worked at all. It just works even less well know.
The real fix here is something like #2417 (adding a propery binary field
type). The current workaround is to use base64 encoding (or base96 or some
other binary->ascii encoding) on the data before storing it. There's
nothing we can do at the text field level, since we are assuming Unicode
strings for text and databases obviously use an encoding when they store
stuff, hence we have to convert between the encoding and Python Unicode
objects.
--
Ticket URL: <http://code.djangoproject.com/ticket/5135#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
-~----------~----~----~----~------~----~------~--~---