Topic: db_update.php
Hello
I have problem with my DB conversion. Existing DB is in ISO-8859-2 (latin-2 / Polish) coding, but has many UTF-8 chars stored as &#xxxx; (like € = €)
I'm loosing those chars after conversion, and geting "?" in its place.
One more thing. Conversion is not changing collate parameter in tables. So after it I have utf8_general_ci tables with latin2_general_ci fields. I found out, that leaving this, unabling you to add special chars like € (for example to Forum Rules).
Can you give me any clue how to sort it out?
What did I try? :
- move conv_tables stage to begin
- creating new stage "pre_start" with changing all latin2_general_ci collatings to utf_general_ci (which is not working at all ??)
function pre_convert_table_utf8($table)
{
global $forum_db;
$result = $forum_db->query('SHOW FULL COLUMNS FROM `'.$table.'`') or error(__FILE__, __LINE__);
while ($cur_column = $forum_db->fetch_assoc($result))
if ($cur_column['Collation'] && $cur_column['Collation'] !== 'utf8_general_ci')
{
$allow_null = ($cur_column['Null'] == 'YES');
$forum_db->alter_field($table, $cur_column['Field'], $cur_column['Type'].' CHARACTER SET utf8 COLLATE utf8_general_ci', $allow_null, $cur_column['Default']);
}
}
- changing collate manualy before conversion
Away. I will be back soon.