Re: Upgrade charset conversion - I'm stuck
Reply #1 – August 09, 2014, 09:13:31 pm
I can't immediately think of any "fool proof" way to do this, but I've not really looked in to the issues before. Seems like you could only trust the column collation if its utf8, other than that you know you are converting. I'm trying to think of the downside of just using the existing column collation, meaning if for some reason its not correct for the language, I'd think there are (or could be depending on the code point correlation) errors already present (and we are not trying to fix that). What did SMF do with the language files, I mean in terms of the conversion?
Re: Upgrade charset conversion - I'm stuck
Reply #3 – August 10, 2014, 12:21:01 pm
emanuele
Global Moderator
Collation and charset are two different things, and in theory (I think) the two can be different for the same column. I read a bit around and querying the information_schema it's possible to grab the charset of the column as well. SMF simply trusts the $txt['lang_character_set'] in index.{default_language}.php. Whatever it is, it is supposed to the "correct", but then the user is given the option to chose another one... I guess I can do the same, just grabbing the collation instead of the $txt, fill in a <select> with the possible (source) charsets and hope for the best... right?