smf 2.0.2 to vb 4.2.0 Impex error and problem with some character

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Oldfield
    New Member
    • Nov 2012
    • 9
    • 4.2.X

    smf 2.0.2 to vb 4.2.0 Impex error and problem with some character

    Hello i have a problem to import smf 2.0.2 to vb 4.2.0 Patch Level 3 with impex.

    Local using Xampp i try to install vb and using impex import smf and got the error:

    ImpEx Database error

    mysql error: Invalid SQL: SELECT username FROM vb_user WHERE username = 'Cam166°vva'

    mysql error: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE) for operation '='

    mysql error number: 1267

    Date: Sunday 11th 2012f November 2012 12:50:56 PM
    Database: fnc
    MySQL error:
    I don't have a great knowledge of php but looking at this forum and on google there are errors due to different Collation and charset using in db.
    In fact smf use utf8_general_ci and vb use latin1_swedish_ci

    I try to create a new db with collation "utf8_general_ci" and install a new fresh vb installation using Msqli but even before running impex i start a new thread to test vb with some character: ' è é ì à ò ù ....
    These characters are not displayed and all nomal text after these are not displayed.

    For example if i write:
    I don't like the rain

    after reply vb show only:

    I don'


    Any suggestions to resolve this and impex error?
  • Trevor Hannant
    vBulletin Support
    • Aug 2002
    • 24358
    • 5.7.X

    #2
    What collation is your SMF database? If utf8_general_ci, create a new database and ensure the database collation is this. Then, make sure that in the vBulletin config.php file, you uncomment the line re UTF-8 and re-install vBulletin on that new database.

    After installing, make sure that the language setting here:

    AdminCP > Languages & Phrases > Language Manager

    ...is also set to UTF-8.

    Now, retry your import.
    Vote for:

    - Admin Settable Paid Subscription Reminder Timeframe (vB6)
    - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

    Comment

    • Oldfield
      New Member
      • Nov 2012
      • 9
      • 4.2.X

      #3
      Hi Trevor,

      Smf use:
      Code:
      Collation "latin1_swedish_ci" 
      table : "utf8_general_ci"  
      type: MyISAM
      Vb use:
      Code:
      Collation  "utf8_general_ci"  
      table: "utf8_general_ci"  
      type: InnoDB
      Vb installed config.php with:

      Code:
      $config['Database']['dbtype'] = 'mysqli';
      
      $config['Mysqli']['charset'] = 'utf8';
      $config['Mysqli']['ini_file'] = 'G:\Xampp\htdocs\vb\includes\mysqli.ini';
      I have create file mysqli.ini content:
      Code:
      [client]
      default-character-set=utf8
      After install i set english language to UTF-8 and try import.
      Impex stuck on poll import about 30mins. (smf have 10 poll max)
      I try to run impex/help.php using cancel and return with no result impex stuck again.

      But I am not interested since being tested import....Then leave impex to mantenance > General Update tools
      Rebuild Thread and forum information
      Rebuild Search Index
      and go to forum home page to see the result.

      Now on thread,post,and username content à ò è ' ù ...and more i have:
      #&039; for '
      #" for "
      ò for ò
      è for è
      ù1 for ù
      ecc....

      I have see: https://www.vbulletin.com/forum/show...28#post1526728

      I think some edit to ImpExconfig.php or not?

      Comment

      • Trevor Hannant
        vBulletin Support
        • Aug 2002
        • 24358
        • 5.7.X

        #4
        Have a look further down the ImpexConfig.php file and you will see a couple of lines regarding UTF-8 encode/decode near the foot. Try editing these lines and retry importing posts with different combinations of these.

        Additionally, you should set the databases to be exactly the same - have the same database and table collations as each other plus use the same database and table collations within each database.
        Vote for:

        - Admin Settable Paid Subscription Reminder Timeframe (vB6)
        - Add Admin ability to auto-subscribe users to specific channel(s) (vB6)

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...