some text are cut off where is Umlaut (öäü or ß) - Yabb 2.1 to SMF 1.1.12

Started by Black_ICE, December 05, 2010, 02:03:14 PM

Previous topic - Next topic



I am trying to convert from Yabb 2.1 to SMF 1.1.12. I downloaded converter files, started conversion. When choosing UTF8 everything is cut off.

When choosing iso-8859-1 in the converter page, some forum entries are there completely and others are cut off.

I compared in Yabb two text files to see if they are coded different. But both are in iso-8859-1. One is not cut off (there is an ö) and other is cut off, where is an ö.

any clues?


I'd recommend to install SMF in iso-8859-1 / latin and choose latin1 as character set at the start of convert.php.


Ok, I have installed SMF again with iso8859-1 encoding. The database has a standard encoding of latin1_german_ci.

When converting, I get this error:

Converting polls and poll choices (part 1)... Unsuccessful!
This query:

    SELECT ID_MEMBER, realName
    FROM `nur_ruhe_smf`.smf_members
    WHERE realName IN ("Wörterbuch(Guest)");

Caused the error:

    Illegal mix of collations (latin1_german1_ci,IMPLICIT) and (utf8_unicode_ci,COERCIBLE) for operation '='

so what is wrong?


can you please check the table smf_members, especially the field realName? I believe the collation of that field is utf8_unicode_ci and this is the problem..


It says everywhere latin1_german_ci

can it be, that the converter sets the connection to mysql specifically to UTF8? because when I enter the SQL Statement in phpMyAdmin it works without error.


maybe, please edit convert.php and find:
mysql_query("SET NAMES $charset");
replace it with
mysql_query("SET NAMES latin1_german_ci");


This did not make any difference. Same error message keeps coming. I also noticed that when importing, the Umlaut were imported as ? (questionmark). so können look like k?nnen. So setting everything to latin1 did not make it better.

Please note that this is an Opensuse 11.3 installation. Mysql is 5.1.46 and Apache is 2.2.15.


I solved the problem by installing smf new, setting everything to UTF8. Also made sure, that the tables are in UTF8.

Then I changed the converter as follows:

in yabb21_to_smf.php I added this function:

    function utf8encodeArray ($anarray)
        foreach ($anarray as $bkey => $bvalue)
            if (is_array($bvalue))
                $anarray[$bkey] = utf8encodeArray($bvalue);
                $anarray[$bkey] = utf8_encode($bvalue);
        return $anarray;

and in the function doBlock I added following line just after if (empty $block)) return;

$block = utf8encodeArray($block);

When importing I also choose UTF8 as default. This made it to import everything correct.