Yesterday I posted my problem here but got no solution.
I spent all day to study this problem.
My ZC1.39h store suffered encoding problem 2 days before. Non-English language can not be displayed correctly. That morning l logged in to my admin and got an error of DB connection (I didn't save the error information, which i regret so much now). Then i refreshed the page. The error is gone and the log in page display. Then i logged in and found this problem.
My ZC store' charset is utf8. I changed following this page: https://www.numinix.com/blog/2011/08...-3-9-to-utf-8/ It had been working very well for a long time until this problem occur. I checked all the setting following the article above, and everything is the same.
I contacted my server support and checked if the did any updating. They replied that they did nothing on updating but just some unscheduled maintenance work. They confirmed that the php and DB charset is all utf8 by default. I guess i can not get more information from them.
To make sure if the problem is caused by the server problem, i installed now ZC1.50 in my server space and found everything is all right. Now i think it was my store problem.
Last night i found that the encoding problem only exists in ADMIN area. To make further research, i wrote a php file with the following code:
PHP Code:
require('includes/application_top.php');
header('Content-Type:text/html;charset=utf-8');
function query($orderID) {
global $db;
$orders_processing = $db->Execute("select delivery_name from ".TABLE_ORDERS. " where ( orders_id =".(int)$orderID.")");
print_r($orders_processing->fields);
}
query(10464501);
I put this file under /MY_STORE/ and run it. Result:
Array ( [delivery_name] => KOGUT Stéphane )
I put this file under /MY_STORE/ADMIN/ and run it (after log in). Result:
Array ( [delivery_name] =>KOGUT St�phane )
I searched 'charset' at my admin and got (i list part of it which i think might be helpful):
Code:
/includes/classes/class.phpmailer.php
Line #40 : * Sets the CharSet of the message.
Line #43 : var $CharSet = "utf8";
/includes/extra_configures/my_db_charset.php
Line #0 : <?php define('DB_CHARSET', 'utf8');
/includes/functions/functions_general.php
Line #1518 : function charsetConvertWinToUtf8($string) {
Line #1525 : * Convert supplied string to/from entities between charsets, to sanitize data from payment gateway
Line #1529 : function charsetClean($string) {
Line #1530 : if (CHARSET == 'UTF-8') return $string;
Line #1531 : if (function_exists('iconv')) $string = iconv("Windows-1252", CHARSET . "//IGNORE", $string);
Line #1533 : $string = html_entity_decode($string, ENT_QUOTES, CHARSET);
/elechouse/includes/languages/english.php
Line #47 : // charset for web pages and emails
Line #48 : define('CHARSET', 'utf8');
/includes/languages/MY_TEMPLATE/english.php
Line #41 : // charset for web pages and emails
Line #42 : define('CHARSET', 'utf8');
/ADMIN/includes/extra_configures/my_db_charset.php
Line #0 : <?php define('DB_CHARSET', 'utf-8');
/ADMIN/includes/languages/english.php
Line #64 : // charset for web pages and emails
Line #65 : define('CHARSET', 'utf8');
I really don't know what to do next to find out solution of this problem.
I will really appreciate if anyone could help me.
Thanks