UTF8 Setup


MyBB 1.2.10 and above feature a new set of UTF-8 tools. These tools allow users to convert their current encodings over to UTF-8 which is rapidly becoming the Unicode standard for many webmasters. However, before you can use these tools we need to make some changes to the config.php.

Contents

[edit] inc/config.php changes

The following changes are to be made in inc/config.php. At this time you should download that file and open it in an appropriate text editor.

1. Look for the following lines in inc/config.php. If they do not exist go to "Adding the code". Otherwise go to "Fixing the code"

[edit] Adding the code

2. Add the following lines right before ?> (located at the end of the file)

/**
 * Database Encoding
 *  If you wish to set an encoding for MyBB uncomment 
 *  the line below (if it isn't already) and change
 *  the current value to the mysql charset:
 *  http://dev.mysql.com/doc/refman/5.1/en/charset-mysql.html
 */

$config['db_encoding'] = 'utf8';


[edit] Fixing the code

2. Find the following line

// $config['db_encoding'] = 'utf8';

And replace it with

$config['db_encoding'] = 'utf8';


[edit] What next?

Save the file and upload it to your server, replacing the old inc/config.php. Now that's done, you can continue to run the UTF-8 tools in the ACP.


Please note that once you've converted to UTF-8 there is no supported way to undo this process.


This page was last modified 22:49, 15 November 2007.