希腊语 - X 购物车
Greek language - X Cart
我最近在另一个网络服务器上打开了我自己的一个旧网站。我上传了数据库,网站文件,检查了连接,一切都运行顺利。
我唯一无法修复的是希腊语显示为
"????"
。检查数据库,一切正确,字母显示,编码为 utf8。所以我最终认为这是 x-carts 问题。我可以尝试做什么? x-cart版本是4.4.1.
您必须检查以下几点:
1) 您要导入的 database.sql 文件是 UTF-8。希腊符号在文本编辑器中可读
aim-server[~/tmp]$ file -ib database.sql
text/plain; charset=utf-8
aim-server[~/tmp]$ grep ελληνικά database.sql
INSERT INTO `xcart_languages` VALUES ('el','lbl_categories','Categories ελληνικά','Labels');
aim-server[~/tmp]$
2) 每个 MySQL 变量都是 UTF-8。希腊符号在 mysql 客户端
中是可读的
[aim_xcart_4_4_1_gold]>show variables like '%colla%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0,00 sec)
[aim_xcart_4_4_1_gold]>show variables like '%char%'; +--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0,00 sec)
[aim_xcart_4_4_1_gold]>select * from xcart_languages where name='lbl_categories';
+------+----------------+-----------------------------+--------+
| code | name | value | topic |
+------+----------------+-----------------------------+--------+
| en | lbl_categories | Categories ελληνικά | Labels |
3) 在“主页 :: 编辑语言 :: 希腊语”页面上的字符集是 UTF-8
4) mysql_query("SET NAMES 'utf8'");
根据include/func/func.db.php文件添加
https://help.x-cart.com/index.php?title=X-Cart:FAQs#How_do_I_set_up_my_X-Cart_to_support_UTF-8.3F
我最近在另一个网络服务器上打开了我自己的一个旧网站。我上传了数据库,网站文件,检查了连接,一切都运行顺利。 我唯一无法修复的是希腊语显示为
"????"
。检查数据库,一切正确,字母显示,编码为 utf8。所以我最终认为这是 x-carts 问题。我可以尝试做什么? x-cart版本是4.4.1.
您必须检查以下几点:
1) 您要导入的 database.sql 文件是 UTF-8。希腊符号在文本编辑器中可读
aim-server[~/tmp]$ file -ib database.sql
text/plain; charset=utf-8
aim-server[~/tmp]$ grep ελληνικά database.sql
INSERT INTO `xcart_languages` VALUES ('el','lbl_categories','Categories ελληνικά','Labels');
aim-server[~/tmp]$
2) 每个 MySQL 变量都是 UTF-8。希腊符号在 mysql 客户端
中是可读的[aim_xcart_4_4_1_gold]>show variables like '%colla%';
+----------------------+-----------------+
| Variable_name | Value |
+----------------------+-----------------+
| collation_connection | utf8_general_ci |
| collation_database | utf8_general_ci |
| collation_server | utf8_general_ci |
+----------------------+-----------------+
3 rows in set (0,00 sec)
[aim_xcart_4_4_1_gold]>show variables like '%char%'; +--------------------------+----------------------------+
| Variable_name | Value |
+--------------------------+----------------------------+
| character_set_client | utf8 |
| character_set_connection | utf8 |
| character_set_database | utf8 |
| character_set_filesystem | binary |
| character_set_results | utf8 |
| character_set_server | utf8 |
| character_set_system | utf8 |
| character_sets_dir | /usr/share/mysql/charsets/ |
+--------------------------+----------------------------+
8 rows in set (0,00 sec)
[aim_xcart_4_4_1_gold]>select * from xcart_languages where name='lbl_categories';
+------+----------------+-----------------------------+--------+
| code | name | value | topic |
+------+----------------+-----------------------------+--------+
| en | lbl_categories | Categories ελληνικά | Labels |
3) 在“主页 :: 编辑语言 :: 希腊语”页面上的字符集是 UTF-8
4) mysql_query("SET NAMES 'utf8'");
根据include/func/func.db.php文件添加
https://help.x-cart.com/index.php?title=X-Cart:FAQs#How_do_I_set_up_my_X-Cart_to_support_UTF-8.3F