1 adelante Dec 12, 2012 04:53
3 sam2kb Dec 12, 2012 06:06
US-utf8 is ok, you don't need to change it. Have you selected utf8 in the installer too?
Open your profile, make sure it's set to utf8
Run this script to conveert all database tables to utf-8.
Save the code as a file, upload it to b2evolution directory and open with your browser
require dirname(__FILE__).'/conf/_config.php';
require $inc_path.'_main.inc.php';
$DB->halt_on_error = true;
foreach( $DB->get_col('SHOW TABLES FROM '.$db_config['name'].' LIKE "'.$tableprefix.'%"') as $table )
{
echo "Converting $table... ";
$DB->query('ALTER TABLE '.$table.'
DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci,
CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci');
}
echo "Changing default charset of DB...";
$DB->query('ALTER DATABASE '.$db_config['name'].' CHARACTER SET utf8 COLLATE utf8_general_ci');
4 sam2kb Dec 12, 2012 06:07
This forum is not converted to utf8 yet.
5 adelante Dec 12, 2012 07:38
Have you selected utf8 in the installer too?
Yes, US-utf8
Open your profile, make sure it's set to utf8
sorry for this question but Where is my profile? If it's Admin mode - System - Locales, Regional Settings option - then yes, it's "English (US) utf8"
Run this script to conveert all database tables to utf-8.
Save the code as a file, upload it to b2evolution directory and open with your browser
Well it didn't help. Or maybe it was useful but not enough. In any case, after running the script (it said 'converting..... about a lot of tables) the problem remained.
However, I googled around and found the same info page that I used as reference when setting up v4:
How I got b2evolution to work in both English and Russian with UTF-8
http://shininghappypeople.net/deljr/b2e-russian-english.html
And did what the page recommends (and I think the same as I did in v4 when setting it up): in _locales.php,
I modified these lines, setting them to utf-8:
$evo_charset = 'utf-8';
$force_io_charset_if_accepted = 'utf-8';
$db_config['connection_charset'] = 'utf8';
I confess I don't really understand what they do but now the comments display just fine. No garbage and no question marks. Hopefully I won't have "issues" the locales file warns about!...
DO NOT CHANGE THIS if your language requires UTF8 (East Asian, Arabic, etc, etc, etc) !!!
* This is NOT the correct way to do it. If you change this setting it may look like it works but YOU WILL HAVE ISSUES!
6 sam2kb Dec 12, 2012 16:07
I believe if you leave only $db_config['connection_charset'] = 'utf8'; it should be enough.
$force_io_charset_if_accepted = 'utf-8'; is not used in v5
Try this
$db_config['connection_charset'] = 'utf8';
If the above won't work, add the second line
$evo_charset = 'utf-8';
$db_config['connection_charset'] = 'utf8';
Anyway, it's safe to use those settings.
Yeah garbage here as well. A third kind of garbage.