coppermine-gallery.com/forum

Support => cpg1.4.x Support => Older/other versions => cpg1.4 cpmFetch by vuud => Topic started by: vivison on February 06, 2008, 05:13:45 PM

Title: Caption provided by cpmfetch does not show UTF-8 characters correctly
Post by: vivison on February 06, 2008, 05:13:45 PM
I'm using cpmfetch 2.0.0 within SMF 1.1.2 and coppermine-gallery 1.4 to show last 6 pics with caption as alt tag in SMF header session. (They look nice! Thanks cpmfetch for such a cool tool.) However, the caption fails to show Vietnamese correctly. SMF and coppermine gallery have no problem displaying the Vietnamese caption. I did change all encoding references to utf8 but no cigar! Please advice on what could be the cause of this display problem.
Thanks and regards.
Title: Re: Caption provided by cpmfetch does not show UTF-8 characters correctly
Post by: vivison on February 07, 2008, 11:21:59 PM
It works (displaying Vietnamese correctly) if I added:

mysql_query('SET NAMES utf8');

before:

$resultset = mysql_query($sqlcode, $this->dbconnection);

Please refer to function dbExecuteSql($sqlcode, $convert=true) (in cpmfetch_dao.php) for the subject line of code.