Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Options

Problem with MySQL encoding

edited December 2008 in Vanilla 1.0 Help
Hello. I was trying to make Vanilla understand utf-8, but I encountered some problems that I can't solve. My situation looks like this: Vanilla 1.1.5a uses utf-8 (set as written in wiki page), MySQL 5.something uses utf8 as connection encoding, and utf8 is default encoding in MySQL. However, no matter how I try to install Vanilla so that it would choose utf8 as collation for it's tables, it chooses latin1 every time. Futhermore, if I try to check what's inside MySQL I get not a strange-looking text, but regular questionmarks instead of [in my case] lithuanian chraracters. Therefore, I can't recover any text through text editor transcoding since character data is lost, I suppose. Even more, exactly the same problem appears if on my localhost and bluehost.com servers. Any ideas where the problem could be? Thank you.

Comments

  • Options
    You may want to add a command to set the encoding to all tables as they are created by the installer, like here: http://lussumo.com/bugs/discussion/112/vanilla-installer-should-set-the-tablesfields-encoding/ Grab this file: http://lussumo.com/svn/vanilla/trunk/src/setup/mysql.sql and save it into your Vanilla's setup folder, then try installing again.
  • Options
    More easily, this problem is solved by changing the DEFAULT character encoding of your database, BEFORE installing vanilla. Most of the time, new empty database are created with swedish latin.

    You can do this latter but this is more work.
  • Options
    Max, how to change this default encoding setting before installation? I tried changing it in appg/settings.php, but it seems, that it only works with upgrades, and since I install a fresh vanilla, I can't make it work. Where to change it and how to install? You are right, my encoding is swedish latin.
  • Options
    Hey, anyone? I really need your hint where to set this eincoding setting before installation.
  • Options
    sniegas, did WallPhone's suggestion not solve your problem?
  • Options
    edited December 2008
    Look at http://lussumo.com/docs/doku.php?id=vanilla:administrators:encodings#cleaning It explains how to convert a latin1 database to utf-8
  • Options
    I did not check here for two days, hope it's not to late.
    Default encoding of the database is set outside Vanilla:
    To switch to utf-8 before installing, launch phpMyAdmin, select you database, and go to the "operations" tab. Down the page there is a select to do this.

    I'm sure I already post this at least twice on this board…
  • Options
    Wooohoo. The trick with "Operations" tab is awesome. Thank you!
This discussion has been closed.