Michael Radziej wrote:
> Hi,
> 
> I think I've hit a show stopper.
> 
> I'm still porting my application to Unicode ... well, before the
> unicode
> changes it was possible to use a TextField for pickles, like
> contrib.Session
> does (Session.session_data).
> 
> But pickling gives a bytestring, and this isn't necessarily valid
> UTF-8. 
> 
> Malcolm, do you have any idea to work around this?
> 

if you only need a workaround for now, then simply treat the pickled 
data as iso-8859-1 encoded data.., decode it and you have valid unicode

(because iso-8859-1 decoding cannot fail...)

it's ugly of course, but at least it works...

the "correct" solution would be to have a BytesField probably...

gabor

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to