View Issue Details

IDProjectCategoryView StatusLast Update
0008074mantisbtlocalizationpublic2009-06-23 15:28
ReporterRiceball Assigned Tovboctor  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version1.1.0a3 
Fixed in Version1.2.0rc1 
Summary0008074: utf8 output problem with mysql-5.0.41-win32
Description

the bugtracker mysql database has already been UTF-8 Unicode (utf8) charset.

but the database convert the utf8 data to GBK charset before saving.

Solution:

modify core\database_api.php
function db_connect(
...
$g_db_connected = true;
//-----added by riceball L:64
if ($t_db_type === "mysql" || $t_db_type === "mysqli") $g_db->execute('SET CHARACTER SET "' . lang_get( 'charset' ) .'"');
//---- added end
return true;
}

function db_pconnect(
...
$g_db_connected = true;
//-----added by riceball L:64
if ($t_db_type === "mysql" || $t_db_type === "mysqli") $g_db->execute('SET CHARACTER SET "' . lang_get( 'charset' ) .'"');
//---- added end
return true;
}

TagsNo tags attached.

Activities

vboctor

vboctor

2007-06-20 20:30

manager   ~0014782

What would happen to the data that was saved before this fix?

Riceball

Riceball

2007-06-21 20:55

reporter   ~0014796

The data can not be read before the fix.
The database convert the utf8 data to local charset before saving. So the browser can not display non-utf8 data.

grangeway

grangeway

2009-05-30 09:29

reporter   ~0021975

Mantis now uses utf8 by default so this should be a non-issue in the 1.2 releases.