Chinese Pages Needed -- eZ publish 3 + MySQL - Unicode

Author Message

Kenneth Wong

Monday 28 April 2003 5:35:09 pm

From the setup guide's message and from postings here, it seems that Unicode support is not complete (or available?) when MySQL is used...

One of my sites needs Chinese language contents, and while standardizing on Unicode would be nice, I can settle with "hard coding" in Big5 now. I don't think I need the translation features -- actually I don't really understand this feature now...

The problem is (as mentioned in another posting), the browser (IE 6) automatically switches back to Western European coding on every page. What setup files should I change to set the default language for a certain site or Section?

Thanks in advance!

Kai Duebbert

Monday 28 April 2003 8:24:29 pm

Hi,

We are doing what you want and are actually using the translation feature (it's fantastic, use it!). I want to write a wiki page for it, but didn't have time yet.

We use English, German and Chinese for our website. Database is MySQL. Charset is "gbk".

(1) Set the charset for the database in override/site.ini.append.php: Charset=gbk in [DatabaseSettings]
(2) Set the charset in override/i18.ini.append.php: Charset=gbk in [CharacterSettings]
(3) Set the charset in the language locale file that you use right. In chi-CN.ini (file: share/locale/chi-CN.ini) or in eng-GB.ini (file:share/locale/eng-GB.ini): Preferred=gbk in [Charset].

I think that's all.

It works for us *except* the input fields in the admin section. I have to look into that because I think the charset for the textfields are not set right (is that how it works?). But you can copy/paste Chinese characters in it that works.

Most important is the right charset for the database.

Kenneth Wong

Tuesday 29 April 2003 12:50:58 am

Thanks, Kai.

I will try this out and report back here soon.

But since I don't fully understand the translation features yet, it may take me some time exploring...

Kenneth Wong

Tuesday 29 April 2003 4:19:56 am

Great! It works with the GBK char set (Simplified Chinese).

Since Traditional Chinese is my goal, I tried replacing all the "gbk"s with "big5"s in those 3 setup files. However, this didn't work as well: Instead of "charset=big5", the HTML sources produced have "charset=cp850", which causes IE to switch to a DOS char set.

Any more ideas? Thanks much!

Tony Wood

Tuesday 29 April 2003 7:42:29 am

We are looking into this as well.

If you want to use utf-8 unicode at the moment you have to options
1. Use postgreSQL 7.3.2 (http://www.postgresql.org/news.php?NewsID=128)
2. Wait for mySQL 4.1 (http://www.mysql.com/doc/en/News-4.1.x.html) as this supports unicode. It is currently in Alpa release but it might have what you need if you are not going prime time right now.

I hope this helps

tony

Tony Wood : twitter.com/tonywood
Vision with Technology
Experts in eZ Publish consulting & development

Power to the Editor!

Free eZ Training : http://www.VisionWT.com/training
eZ Future Podcast : http://www.VisionWT.com/eZ-Future

Kai Duebbert

Tuesday 29 April 2003 8:12:16 pm

The charset big5 is definitely the right one for mySQL, so this setting is ok (and I think there is no other charset for simpl. Chinese in mySQL).

eZp seems to change big5 to cp850 somewhere, but don't ask me where (it does some charset conversions so I guess the problem lies there). Try some other charsets in the i18n.ini or site.ini, maybe that helps.

cfa cfa

Friday 15 August 2003 12:19:31 am

Kai,

Does the search function return any good results for you when searching for chinese words?

I followed your instruction setting everything to GBK but the search function still would not find anything.

Did you tweak your mysql database settings?

Bård Farstad

Friday 15 August 2003 6:15:26 am

We've had no problems with MySQL 4.1(alpha). We've used it on www.fast.no ( see japanese section ).

eZ publish handles searching of chinese and japanese words.

There should be no problems using eZ publish with chinese or japanese at this time.

--bård

Documentation: http://ez.no/doc

cfa cfa

Friday 15 August 2003 10:50:56 am

bard,

unfortunately my host only sports mysql version 4.0, so no native unicode support yet. so i try to settle with any other character set that works with mysql 4.0 and php 4.3.2 to display and store chinese characters.

any recommendations from your side?
i haven't really worked out on how to "alter database" to another character set like GBK.

regards!

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.