WordPress.org

Ready to get started?Download WordPress

Forums

Duplicator
[resolved] Not working right with non-latin UTF-8 character set (11 posts)

  1. supersuphot
    Member
    Posted 2 years ago #

    I use the latest version of Duplicator 0.2.5
    and get the wrong character when install (Thai Language).
    Ex. ��سҾ���

    I also check "Enable database character encoding" On the options dialog.

    I looking in database.sql file. Everything look correct.
    So I edited install.php at line 469.

    $conn = @mysql_connect($dbhost, $dbuser, $dbpassword)
    			or die(sprintf(MSG_FAIL_DBCONNECT, mysql_error()) . $tryagain_html);

    add this after:

    mysql_query("SET NAMES 'utf8' ");

    Perfect! everything install correctly :)

    I assume that some machine has no utf-8 as default character set. so I force that. This might help other or maybe you can put in next version.

    Thanks.

    http://wordpress.org/extend/plugins/duplicator/

  2. Cory Lamle
    Member
    Plugin Author

    Posted 2 years ago #

    Hey supersuphot,

    That's great! I'll get this integrated into the next versions...

    Thanks!

  3. dreamstone
    Member
    Posted 2 years ago #

    I have same problem with russian language.
    Ex. ? ?????????
    What line I should edit in current version 0.2.9 and where insert mysql_query("SET NAMES 'utf8' ");?

    Thanks!

  4. Cory Lamle
    Member
    Plugin Author

    Posted 2 years ago #

    Hi dreamstone,

    To use Unicode character sets on your site please make sure to do the following:

    1. When creating a package, be sure that in the options dialog the checkbox 'Enable database encoding' is unchecked

    2. When running the installer make sure the checkbox for 'Enable MySQL character set' is checked

    Let me know if that works for you.

    Thanks

  5. dreamstone
    Member
    Posted 2 years ago #

    Hi lifeinthegrid!

    You are right! It works now!!!

    Thanks!

  6. Cory Lamle
    Member
    Plugin Author

    Posted 2 years ago #

    Hey dreamstone,

    Thats great! Let me know if you come across any others issues with characters sets.

    Thanks

  7. onur.ozgur.ozkan
    Member
    Posted 1 year ago #

    Hi Lifeinthegrid,

    Same problem here with Turkish character ç ü ğ ö etc. I use WP 3.4.1, Duplicator 0.3.1 .

    I follow the orders

    1. When creating a package, be sure that in the options dialog the checkbox 'Enable database encoding' is unchecked

    2. When running the installer make sure the checkbox for 'Enable MySQL character set' is checked

    I look around the installer.php and i see that you use mysqli and i couldn't find any bug. I focus line 134

    $dbmysqlichar = (isset($_POST['dbmysqlichar']) && $_POST['dbmysqlichar'] == '1')  	? true : false;

    line 723-726

    if ($dbmysqlichar) {
        mysqli_set_charset( $mysqli_conn, "{$GLOBALS['MYSQL_CHARSET']}");
        dinstaller_log("MySql: charater set enabled to '{$GLOBALS['MYSQL_CHARSET']}'\n");
    		}

    And Advanced Opts form line 1010 - 1024.

    Is there any way to work around this problem? Or I miss something?

    Thanks.

  8. onur.ozgur.ozkan
    Member
    Posted 1 year ago #

  9. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    Hey onur,

    The fix for this is in the developer line. Just reinstall that version and it should work. It should also be available in 0.3.2 when it is released...

  10. pajik
    Member
    Posted 1 year ago #

    The same problem on czech language on version 0.3.1!
    Thanx to onur.ozgur.ozkan your solution works perfect!!!
    Thank you

  11. Cory Lamle
    Member
    Plugin Author

    Posted 1 year ago #

    When using the older mysql libs "UTF-8" was the required string. Updating to mysqli it required "utf8". I thought I had covered this in testing but somehow it got overlooked sorry about the confusion!

    Cheers!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags