Zen Cart Logo
Forums / Upgrading to 1.5.x / Language Display Problems...

Language Display Problems...

Views: 4,833

Results 21 to 26 of 26
25 Apr 2013, 10:39 AM
#21
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Language Display Problems...

Thanks for getting back to me on this.

I have checked the three php files you mentioned and they "appear" to be correctly set to UTF-8. Perhaps I should send you a zip file of them as I may be overlooking something.

I am using copy/paste and also typing in the characters. The same result...

I am not using Ckeditor. Plan to install it but have not yet.

Regarding the website template having a meta tag indicating content to be utf8, I am not sure what file I should be looking at to check that. Could you let me know?

Thanks!

26 Apr 2013, 10:06 AM
#22
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Language Display Problems...

I have now installed Ckeditor and done more testing but no change.

I have been through all the files in what I believe is my website template (includes/template/my_template01) including the common, CSS and templates folders. I could not find text in the files that was connected to character sets...

I am just wondering... In the templates folder there are three templates, classic, my_template01, template_default.

Is it correct to have all three?

I notice that the template_default has many more items in it than my_template01. I know that the files in my_template are the are for mods I have made...

Perhaps one the files in the template_default is what is causing the problem...

Below are what I believe are the pertinent settings for each of the php files in question. Is there something I have missed? Should there be anything additional?

Thanks in advance!


admin/includes/languages/japanese.php

mb_language('Japanese');
mb_internal_encoding("UTF-8");
mb_http_output("UTF-8");

// EMAIL config
define('EMAIL_CHARSET', 'ISO-2022-JP');
define('EMAIL_ENCODING', '7bit');
define('EMAIL_MIMEHEADER', 'B');
define('EMAIL_IS_MULTIBYTE', TRUE);

// Global entries for the <html> tag
define('HTML_PARAMS','dir="ltr" lang="ja"');

// charset for web pages and emails
define('CHARSET', 'utf-8');


includes/languages/japanese.php

// look in your $PATH_LOCALE/locale directory for available locales..
@setlocale(LC_TIME, 'ja_JP.UTF-8');
mb_language('Japanese');
mb_internal_encoding("utf-8");
mb_http_output("utf-8");

// EMAIL config
define('EMAIL_CHARSET', 'utf-8');
define('EMAIL_ENCODING', '7bit');
define('EMAIL_MIMEHEADER', 'B');
define('EMAIL_IS_MULTIBYTE', TRUE);


includes/languages/my_template01/japanese.php

mb_language('Japanese');
mb_internal_encoding("UTF-8");
mb_http_output("UTF-8");

// EMAIL config
define('EMAIL_CHARSET', 'UTF-8');
define('EMAIL_ENCODING', '7bit');
define('EMAIL_MIMEHEADER', 'B');
define('EMAIL_IS_MULTIBYTE', TRUE);

// charset for web pages and emails
define('CHARSET', 'utf-8');

1 May 2013, 2:16 PM
#23
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Language Display Problems...

I checked a backup of the database and found that most of the Japanese is stored in this format:

¡Ö911ÌÜ·â¼Ô¡×

That particular text, appears the same way when viewed in the backend.

However, in the front end, it appears as it should: 「911目撃者」but only when my browser encoding is set to Japanese EUC.

If I change the browser encoding to Western (ISO Latin 1) it appears as: ¡Ö911ÌÜ·â¼Ô¡×

I believe what I need to do is convert the format of the data in the database. I have spent the last few hours trying to find a way to convert

¡Ö911ÌÜ·â¼Ô¡×

to

「911目撃者」

but have had no luck.

As zen-cart seems to be able to do the conversion, surely there must be a way? Of perhaps, the exported data is not the same as what is stored online??

Any thoughts on this would be greatly appreciated.

Thank you!!

1 May 2013, 3:32 PM
#24
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Language Display Problems...

I just noticed that changing the browser encoding with this page to EUC makes everything written on the page readable...

6 May 2013, 3:08 PM
#25
peace_freak avatar

peace_freak

Zen Follower

Join Date:
Apr 2006
Posts:
354
Plugin Contributions:
0

Re: Language Display Problems...

Well, I have managed to get the Japanese to display properly in both the admin and the store front. I had almost given up but in post 125 of in this discussion: UTF-8 Zen-Cart Tutorial for v1.3.x

http://goo.gl/XqZNw

I came across this:

...create /includes/extra_configures/my_db_charset.php and /adminFOLDER/includes/extra_configures/my_db_charset.php

Both files need this php code: <?php define('DB_CHARSET', 'utf8');

I had not come across such an instruction before. I checked my admin and the file was there but there was no such file in the main includes. Added it in and everything appeared correctly.

Am now in the process of rebuilding many of the pages that were formated in Japanese EUC...

6 May 2013, 3:15 PM
#26
dbltoe avatar

dbltoe

Totally Zenned

Join Date:
Jan 2004
Location:
N of San Antonio TX
Posts:
9,776
Plugin Contributions:
11

Re: Language Display Problems...

Glad you got it going. And, thanks for posting the solution.