How to Upgrade osCommerce form ms1(latin1) to ms2(utf8)

Pre-Installation Procedure:
1. Download the osc22ms2_utf8.zip file from http://www.kmd.com.tw/
2. Unzip this file to new folder of Web Server.

Upgrade Procedure:
1. Type the URI of new folder in Web Server. Ex: http://www.xxx.com/install/index.php
2. Click the Install Button.
3. Select the Upgrade option.
4. Type Mysql db information.
5. Select the "Continue" Button, then you will see those tables of db have been modified successfully.
6. Type the URI of step1 again, and click the Install Button, too.
7. Select the Install option.
8. Don't select the import any db data option, select save the configuration.
9. Type Web Server information.
10. type Mysql db information.
11. Finish, check your new osCommerce website.

Change MySQL data in latin1 to utf8:
This step, you can refer Turning MySQL data in latin1 to utf8 utf-8, or WP.ORG.CN
But, just use "mysqldump -uUSERNAME -pPASSWORD --database DBNAME --default-character-set=latin1 > /home/SAVEFILE", then open SAVEFILE by Notespad, import the SAVEFILE through phpmyadmin.

Modify osCommerce Database.php code:
1. Find out "mysql_query" string in Three file, includes\functions\database.php, admin\includes\functions\database.php, install\includes\functions\database.php.
2. Insert below words before "mysql_query" string.
mysql_query("SET NAMES 'utf8'");
mysql_query("SET CHARACTER_SET_CLIENT=utf8");
mysql_query("SET CHARACTER_SET_RESULTS=utf8");

March 2010

Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Archives

Powered by Movable Type 4.34-en

About this Entry

This page contains a single entry by philipz published on April 5, 2007 3:12 AM.

Backup Notes Document on LotusScript was the previous entry in this blog.

PHP5 & osCommerce is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.