Slashdot Mirror


Migrate a MySQL Database Preserving Special Characters

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."

2 of 98 comments (clear)

  1. Uhhhhhh... by Anonymous Coward · · Score: -1, Flamebait

    1) determine the encoding of your existing data (hint: if it has two or three junk characters in a row where you expected one non-ASCII character, it's probably UTF8).

    2) set your table to use that encoding

    3) import your data

    If you're a web programmer reading this right now, do the world a favor and learn about the following two things: #1 character encodings #2 time zones. (Oh and #3 basic data management theory, but I know, that's stretching it). I see these things done wrong. All. The. Fucking. Time.

  2. Re:How is this news? by Anonymous Coward · · Score: -1, Flamebait

    How is this news??? Later on today: "Data from POST/GET and special characters"? It's a bug report for "yet another way MySQL corrupts your data". People thought MySQL fixed that when they finally got around to supporting basic ACID compliance, but they are rather nostalgic about the old ways and decided to keep around a corruption or two.