Please upgrade here. These earlier versions are no longer being updated and have security issues.

Character encoding problem after moving from phpBB to Vanilla2

candymancandyman ✭✭
edited November 2011 in Vanilla 2.0 - 2.8
The original phpBB collation was latin1 (swedish_ci), when I installed Vanilla2 I've left the default utf-8: now some characters like é è and à doesn't show properly.
Where I failed?


  • ToddTodd Chief Product Officer Vanilla Staff
    edited November 2011
    You can try the following right at the top of phpBBx->FormExport():
    // Get the characterset for the comments.
    $CharacterSet = $Ex->GetCharacterSet('users');
    if ($CharacterSet)
    $Ex->CharacterSet = $CharacterSet;
  • candymancandyman ✭✭
    edited November 2011
    Many thanks, I'll try and let you know.
    This command will convert all in utf-8? Just to know.
  • utf8_encode

    grep is your friend.

  • ToddTodd Chief Product Officer Vanilla Staff
    edited November 2011
    This will not convert everything to utf-8 specifically, but the porter does that in other ways. I think that the problem is more that MySQL is connecting to the database as utf8 and that's garbling the output before the porter even has a chance to convert it.

    I will also say that character encoding in MySQL and php is a complete bitch so this isn't an easy problem to solve. Even though your database is latin1 the data in it may be another encoding. I've spent countless hours trying to fix encoding problems and there isn't one fix.

    If you are backing up and restoring you database you can also irreversibly screw up the encoding of your data in that step so make sure your data looks right in some application before even running the porter.

    And finally, for anyone that may read this and has the choice in the future. Please choose utf8 whenever you can on any database or application that you use ever.
Sign In or Register to comment.