ez.no / exponential / documentation / configuration / configuration / language and charset / unicode with exponential
To use unicode with Exponential you should use PostgreSQL. MySQL has Unicode support in version 4.1.1 and newer, which is not stable at the time of writing this.
To be able to run Exponential with Unicode (UTF-8) support you need to create a database which has support for this. This is done with the createdb command.
$ createdb -E UNICODE mydatabase
To list the available databases and see what kind of charsets they support you can run psql -l.
$ psql -l List of databases Name | Owner | Encoding -----------+----------+----------- nextgen | postgres | UNICODE template0 | postgres | SQL_ASCII template1 | postgres | SQL_ASCII (3 rows)
From version 4.1.1 MySQL has support for unicode. To convert your existing database to utf-8 do the following:
Stop mysql
mysqladmin -uroot -p<password> shutdown
You need to run this to convert your database
myisamchk -r -q --set-character-set=utf-8 /path/to/mysql_data_files/database/ez*.MYI
Example
myisamchk -r -q --set-character-set=utf-8 /var/lib/mysql/nextgen/ez*.MYI
If you create a new database you can ( from MySQL version 4.1.1 ) use:
create database nextgen character set utf8;
To make Exponential handle Unicode properly you need to configure which charsets the different layers use. You will need to configure database, internal locale and default template charset. This is configured in the files:
site.ini: [DatabaseSettings] Charset=utf-8 i18n.ini: [CharacterSettings] Charset=utf-8 template.ini: [CharsetSettings] DefaultTemplateCharset=utf-8
That's it. You can now enjoy Unicode characters with Exponential.
The search engine does not properly index languages which does not use space as word separator, like chinese and japanese. Update: The current unstable (svn) version has support for this. It will be standard from version 3.2.
Log in or create a user account to comment.
Comments
can't override the i18n.ini file
Xavier Dutoit
Tuesday 25 October 2005 7:53:21 pm
step by step doc: move to utf-8
Peter Schnuerer
Wednesday 29 June 2005 7:04:09 am
I'm running on Exponential 3.5.1. After adding a lot of content, I found that in some cases german charakters dont work correctly in some cases!
See:
http://ez.no/community/forum/setu...ative_image_text_and_charset_problem
http://ez.no/community/forum/setu...omega_omega_not_working_in_xml_field
The solution seems to be, to move to UTF-8 encoding
I have learnd that I have to do the following
1. Update mySQL from 4.0.x to 4.1
2. Update DB-Tables
3. Change ini-Settings
Does anyone have a step-by-step Doku how this is done?
NEED URGENT HELP!
Thanx,
Peter
Does myisamchk really update all tables?
Sven Berg Ryen
Friday 06 May 2005 3:31:46 pm
Could somebody please clarify this issue? TIA.
Set-collation, not set-character-set
Sven Berg Ryen
Friday 06 May 2005 3:14:36 pm
From: http://dev.mysql.com/doc/mysql/en/news-4-1-11.html
<quote>The --set-character-set option for myisamchk was changed to --set-collation. The value needed for specifying how to sort indexes is a collation name, not a character set name. (Bug #8349)</quote>
Convert to Unicode
Kristian Hole
Friday 04 March 2005 3:06:38 pm
This seems to work. The database was clean, so i don't know how this works for databases with lots of content.
MySQL 4.1.3 update
Tony Wood
Friday 02 July 2004 5:04:25 pm
To convert to utf-8 unicode ci you need to use.
utf-8 convert
Georg Franz
Wednesday 21 January 2004 2:25:34 pm
first of all: If there is really no good reason to convert the charset, just don't do it!!
If you have an existing db which uses iso-8859-1 encoding and you want to switch to utf-8 you have to convert your db table content too.
Be aware: In some mysql versions there are bugs belonging to the utf-8 charset! (just search in the forums of ez.no and mysql.com!)
So, do the described steps above and write an "update.php" script.
Example code:
(and so on)
If anyone needs such a convert script I will make a contribution, write to emil.webber@gmx.at.
Kind regards,
Georg.