Quote from: sottwell at Oct 08, 2010, 12:45 AM
I find that I have to use CPanel to create the database, then use phpMyAdmin to change the collation to what I want (usually utf8_general_ci), then I can import/install or whatever.
If you’re using a localhost dev environment, you can edit your own my.cnf or my.ini to make utf8 the MySQL default.
I don’t think that changes the charset of the data properly (though I could be wrong). If it were that easy, there wouldn’t be all the complex instructions for conversion out there (most involve manually dropping all text-based indexes, converting text fields to blobs, converting them to text again, and recreating all the dropped indexes). I’m trying to do all that in code.
I am making some progress with this. Part of the problem was that some of the fields in the MODx DB are MySQL key words (key, constraint, and release). I’ve dealt with that, but in the latest MySQL, "SHOW FULL COLUMNS FROM " . $table; and "SHOW INDEX FROM ".$table; don’t return what they used to so identifying compound keys is trickier. Also the SQL for dropping a primary key seems to have changed.
I think I’m getting closer, but it’s hard to tell until I can generate a batch of SQL statements that will run throwing an error.