forum.coppermine-gallery.net
Support => cpg1.5.x Support => cpg1.5 language => Topic started by: whitewash on September 06, 2010, 03:49:19 pm
-
Hello,
I did the upgrade from 1.4 branch to version 1.5.8. I've deleted everything except albums/, uploaded content of 1.5.8 archive, restored backed-up include/config.inc.php and ran update.php... everything worked just fine,
except that now names of albums,categories and everthing else, which is stored in the database, display incorrectly. All language-specific chars. are not showing properly, only the ? sign shows instead. Strings stored in language files (such as translations of buttons etc...) show fine.
All database tables' charsets and collations are set to utf8, Coppermine charset is set to utf8, the 1.4.x version was also utf8 (and working well) and the page even declares utf-8 charset itself(in <meta> tag). But the names are still corrupted.
Access to the gallery is temporarily restricted to the public, so the link would be of no use, but I can post screenshot:
-
Can't edit the previous post :(
The gallery was bridged into SMF1.1.x forum (and will be again as soon as it goes back online)
-
All database tables' charsets and collations are set to utf8, Coppermine charset is set to utf8
Then your content is maybe not utf-8 encoded. Try other encodings.
-
Hello,
I'm pretty sure it is, it was set to utf8 from the beginning. When I enter phpmyadmin (with connection collation and charset set to utf8) and browse `categories` table, all strings are OK
-
After digging in Coppermine's code, I've found a workaround. It's more a hack than a workaround, though :)
in include/functions.inc.php, function cpg_db_connect(), just before the last return, I added the following line:
mysql_query("SET NAMES 'utf8' COLLATE 'utf8_czech_ci'", $result);
Note for others if you have the same problem: this is not general solution, it would probably work for you as well, probably not, there surely is more elegant one :)
-
Please see also that (http://forum.coppermine-gallery.net/index.php/topic,49620.0.html) thread. Adding
$CONFIG['dbcharset'] = 'utf8';
to include/config.inc.php should also solve your problem.
-
Unfortunately, I've found link to that topic in some other thread before, but I can't access it.
The topic or board you are looking for appears to be either missing or off limits to you.