Forum
Chinese content not displaying on a multilingual site
I have an issue where some Chinese content is not displaying on a multilingual site. I have done some research and it seems that it could be something to do with character encoding? I have downloaded the database and installed the site on my local environment (MAMP), republished the content and all the content is displayed as it should be. Republishing on the live site doesn't have the same effect, the content remains missing. Could this be due to the windows server?
When I try and save the page, I get this error in the Debug info:
Invalid query: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xE7' for column 'indexValue' at row 1
Diagnostics report:
Perch: 2.8.32, PHP: 5.4.45, MySQL: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $, with PDO
Server OS: WINNT, cgi-fcgi
Installed apps: content (2.8.32), assets (2.8.32), categories (2.8.32)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /admin
PERCH_PATH: D:\home\site\wwwroot\admin
PERCH_CORE: D:\home\site\wwwroot\admin\core
PERCH_RESFILEPATH: D:\home\site\wwwroot\admin\resources
Image manipulation: GD
PHP limits: Max upload 10M, Max POST 10M, Memory: 256M, Total max file upload: 10M
F1: 0243314cd872a1b8ddf8ff917af81c7e
Resource folder writeable: Yes
SCRIPT_NAME: /admin/core/settings/diagnostics/index.php
REQUEST_URI: /admin/core/settings/diagnostics/
DOCUMENT_ROOT: D:\home\site\wwwroot
HTTP_HOST: www.domainname.com
Is everything UTF8 throughout?
Hi Drew,
Yes, I think so, I certainly haven't specified anything other than defaults.
Are you serving your pages as UTF8?
Yes...
Hi Drew,
I have isolated the problematic characters as being commas ','. If I remove them from the text and save the content, the page loads as expected. Here is an example piece of text that causes an issue.
Those don't look like normal commas. What are they?
They seem to be a character in their own right. I have replaced them with a regular comma + space but the page is still not displayed. Strangely, they are used in other areas on the site that is displaying correctly. If i just have a regular comma without the space, the page saves and the content is displayed.
Can you show me the template?
Sure, FYI this seems to be an issue with the database on the clients setup, I have it working correctly on my local setup. If I export my local db tables and import them to the live server all works as expected and the page content shows. If you go to the region and press save the content disappears. Full template below. The bit we are having issues with is
<perch:content id="product-intro" type="textarea" html="true" editor="ckeditor" label="Product Intro" help="Use H2 for headings" />
You're using CKEditor? Have you turned that off to eliminate it as a cause?
Just tried it, changed to markitup and saved but still not working.
Have you checked the table encoding?
Encoding: UTF-8 Unicode (utf8) Collation: utf8_general_ci
What's different between that server and yours?
Local:
Live
You might need to delve a bit deeper with your server admin.