Re: Can't decode french characters after switching to PostgrSQL from MySQL
This must be my problem all along:
-- By the way, if you're using python 2, you shouldn't be using 'string' notation for character strings and should be using the u'string' one.
'string' is a binary string while u'string' is a text string.
This is misleading with python 2 as there's implicit conversion between the two and utf8 will be used as the default charset which may lead to the kind of errors you've faced.
'string' is a binary string while u'string' is a text string.
This is misleading with python 2 as there's implicit conversion between the two and utf8 will be used as the default charset which may lead to the kind of errors you've faced.
I was not using u' at all I was always using the binary strings and had no problems. I guess MySQL would convert them automagically for me while Postgres must deal with the data raw waiting for me to add the u' to it and then it works. So what I was really looking for is an option that would convert all binary strings to unicode (text) strings for me without me having to go back and test and add it manually all over the place...
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home