Migrate a MySQL Database Preserving Special Characters 98
TomSlick writes "Michael Chu's blog provides a good solution for people migrating their MySQL databases and finding that special characters (like smart quotes) get mangled. He presents two practical solutions to migrating the database properly."
Re:Unicode integration woes (Score:1, Insightful)
What's with the sudden influx of gnubies? (Score:5, Insightful)
If you do insert unicode data into a latin1 table, you will get unexpected results.
What you do is make sure that your:
a) database(s) are set to utf8 by default
b) table(s) are set to utf8 by default
c) column(s) are set to utf8 by default
d) connection defaults to utf8
(provided, of course, that it's utf8 you're after)
That way, it'll "Just Work"(tm)
We've gone through upgrades from 3.23 -> 4.0 -> 4.1 -> 5.0 and never had a problem; and yes, our tables were all latin1 from the beginning.
Re:What's with the sudden influx of gnubies? (Score:3, Insightful)
If you do insert unicode data into a latin1 table, you will get unexpected results.