Zen Cart Logo
Forums / Upgrading to 1.5.x / Chinese Language from Database Garbled after upgrading from v137

Chinese Language from Database Garbled after upgrading from v137

Views: 1,678

Results 1 to 3 of 3
20 May 2015, 5:38 PM
#1
haostaff avatar

haostaff

Zen Follower

Join Date:
Oct 2007
Location:
Hong Kong
Posts:
112
Plugin Contributions:
0

Chinese Language from Database Garbled after upgrading from v137

Managed the upgrade, except the Chinese texts (category titles, products titles, descriptions, etc.) from the database are garbled.

Leave link to Chinese pages here: http://haostaff.com/store/index.php?main_page=products_new It is fine if toggled to English.

Worked for hours and hours without result. Some expert pointers are much appreciated! I hope I can re-install / upgrade it the right way.

Exported database using phpMyAdmin. Old database characters were Latin1_Swedish. languages/chinese.php has always been "define('CHARSET', 'GB2312');".

Imported the database, using "UTF8" default. Ran the zc_install for database upgrade.

Spent hours trying to change, or re-import the database in difference characters and collates. No luck.

Noticed the 1.5.4 admin/includes/configure.php and includes/configure.php files have "UTF8" set as database character.

Don't know how to make sense of all of these. Thanks in advance for any help!

Jeff

20 May 2015, 6:41 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: Chinese Language from Database Garbled after upgrading from v137

I suggest running this utility: https://www.zen-cart.com/downloads.php?do=file&id=1318

Try letting it just convert to utf8.
If that's still not sufficient then try altering it to use the correct collation for GB2312 equivalent.

You'll need to set the proper CHARSET in your own language files, or set CHARSET to utf8 to match.

21 May 2015, 3:01 AM
#3
haostaff avatar

haostaff

Zen Follower

Join Date:
Oct 2007
Location:
Hong Kong
Posts:
112
Plugin Contributions:
0

Re: Chinese Language from Database Garbled after upgrading from v137

Thank you, DrByte, as ever.

I did run that utility, but only blindly and did not follow through with other moves as I did not know what I was doing at all.

Now it's all fixed! What I did not try before was amending the admin/includes/configure.php and includes/configure.php files

define('DB_CHARSET', 'utf8_general_ci'); (from previously 'utf' only)

Did not have to change my Chinese language files, they are still

define('CHARSET', 'GB2312');

That did it for me. Once again, thanks!