Re: Can't decode french characters after switching to PostgrSQL from MySQL
On Thu, Aug 22, 2013 at 1:37 PM, Radomir Wojcik <radomir@cldssinc.com> wrote:
And I tried with both UTF8 and LATIN1 database encodings, both produce the same error:List of databasesName | Owner | Encoding | Collate | Ctype | Access privileges-----------+----------+----------+-------------+-------------+-----------------------mandala | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |mandala3 | postgres | LATIN1 | C | C |I have a feeling that this is related to django + postgres as I noticed too that the login username used to be case insensitive but after the conversion is case sensitive.. strange. Is Postgres really that good? If I can't fix I will have to switch back to MySQL and wait for MariaDB to be officially supported...
Yes, PostgreSQL is that good. Without wanting to be too blunt, PostgreSQL is a database; MySQL is a popular tool that can be used to store data.
It's difficult to say for certain what has gone wrong without knowing exactly how you've exported your data. However, all indications suggest that something in your conversion chain has gone wrong, and as a result, you've got data that has been double converted, or is being interpreted as ASCII when it's actually unicode content. If you put unicode content into a PostgreSQL database that has been configured to use UTF-8, it handles it fine. However, if you put in garbage, or you haven't configured PostgreSQL to handle UTF-8 content, you can't expect it to work without problems.
The best way to track this down is to follow a single string from one database to another. First, put a string that is known to be UTF-8 into your PostgreSQL database, and make sure it comes out OK. Then, pick a row in your MySQL database that has unicode content in it, and export it from MySQL. Make sure the exported format has the content correctly encoded. Then import into PostgreSQL; check that was has been imported correctly. Once you've moved a single string from one database to another, you can reproduce that process en masse for the rest of your database.
Yours,
Russ Magee %-)
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