Japanese text now gibberish after MySQL 8.0 upgrade Japanese text now gibberish after MySQL 8.0 upgrade
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Japanese text now gibberish after MySQL 8.0 upgrade

Started by phil1011, August 05, 2024, 08:40:45 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

phil1011

Hello,

I'm running version 1.6.07.

After my web host upgraded to MySQL 8.0 (from MySQL 5.7), my site's Japanese text has become gibberish.

How can I fix this?

My web host's support gave me this message:

"The issue you are running into is that the older versions of MySQL
used "latin1" character set and "latin1_swedish_ci" collation as the
server defaults. The new versions of MYSQL now use 'utf8mb4' character set
and usually "utf8mb4_0900_ai_ci" as the collation. Your content was encoded
under latin and swedish terms, but is now being served or read as if it was
utf8mb4 encoded.

We are not overly familiar with Coppermine Photo Gallery, but many
users that have seen similar issues with other software packages have been
able to correct their issues by setting their software to expect or use the
"latin1" character set, without making any changes to the database itself.
I am not certain if this is a setting available in Coppermine though."

Thanks for any advice.

ron4mac

Add this line:
$CONFIG['dbcharset'] = 'latin1';
to the bottom of your include/config.inc.php file.

phil1011