MyBB Community Forums

Full Version: How to convert the charset code?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
The default charset of MyBB in my server is "iso-8859-1", how can I convert it into "UTF-8" or other character set?
Open the file inc/languages/yourlanguage.php and search for:
$langinfo['charset'] = "iso-8859-1";
Replace with
$langinfo['charset'] = "utf-8";
so how to convert to the threads and posts before to utf-8 charset?
I don't advise you to migrate ot ver 1.2 and UTF-8, until the coders resolve bugs & issues I've reported here:
http://community.mybboard.net/showthread.php?tid=11922
The reason is quite simple, not only your info won't be converted properly if they contain non-latin characters but you can pretty much mess up your database's collation.
A possible solution (not tested) is to dump those threads, forums and pm to a sql file, convert encoding with some tool like iconv (a simple online version can be found here) to UTF8 and reinsert it back before update (dont forget to change collations in sql file).

Anyway, as always backup the entire forum before you proceed.