About changing the collation of all tables to utf8_general_ci

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rag_gupta
    Member
    • Apr 2011
    • 74

    About changing the collation of all tables to utf8_general_ci

    I'm migrating Mybb 1.6 to VB4( then to VB5).

    However the multilingual strings are getting converted to ????.

    It seems on default VB4 installation the table collation is set to latin1_swedish_ci.


    Also if I change the collation of table to utf8_general_ci the multilingual string is getting imported correctly.

    Can I go ahead and change the collation of all the tables to utf8_general_ci as explained in the link?( With command: ALTER TABLE mytable CONVERT TO CHARACTER SET utf8 )

    Will it cause any problems in VB5?
    I'm getting error: Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='" I tried changing both tables manually to utf8_general_ci,IMPLICIT but I'm
    Last edited by rag_gupta; Thu 5 Apr '18, 8:26am.
  • Wayne Luke
    vBulletin Technical Support Lead
    • Aug 2000
    • 73981

    #2
    vBulletin 4 doesn't have a default collation. It uses the collation and character set that the database is set to. On most MySQL installations, this is an archaic latin1_general_ci or latin1_swedish_ci collation. You should convert the database before running vBulletin's install and all the tables will inherit the tables you set.

    You can change the collation and character set. However, if you're using Arabic or other two-byte languages, this can render your data into "gibberish". The issue is that vBulletin 3 and 4 used workarounds to simulate UTF-8 support and these workarounds can break when you convert the character set and collation of a database. This issue is especially pronounced in vBulletin 5 which expects data to be closer to UTF-8 than most upgrades provide.If you do switch and plan on upgrading to vBulletin 5 in the future, we recommend using a UTF8MB4 character set and collation for the best support.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API

    Comment

    Related Topics

    Collapse

    Working...