
Adding Chinese
Moderators: General Support Moderators, General Support Moderators
- joombler
- Joomla! Enthusiast
- Posts: 221
- Joined: Thu May 17, 2007 3:44 pm
Adding Chinese
I have a site in English and French to which I have to ad Traditional Chinese and Simplified Chinese. Can someone pls tell me how I can update my site to UTF-8, as I read that using Chinese content needs having UTF-8 database to be sure there will be no data loss...?


Artificial intelligence is not match for natural stupidity
- smithveg
- Joomla! Enthusiast
- Posts: 232
- Joined: Thu Jun 29, 2006 7:27 am
- Contact:
Re: Adding Chinese
Me too..
I would like to add some chinese content into my site.
The content can be write and display in chinese. But the content title, and title alias cannot.
I do try to change the collation in database to utf8. It seems cannot work. Anyone help?
After saving "北海". It will become "w&×"
Any suggestion?
I would like to add some chinese content into my site.
The content can be write and display in chinese. But the content title, and title alias cannot.
I do try to change the collation in database to utf8. It seems cannot work. Anyone help?
After saving "北海". It will become "w&×"
Any suggestion?
You do not have time to think about failure.
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65
- joombler
- Joomla! Enthusiast
- Posts: 221
- Joined: Thu May 17, 2007 3:44 pm
Re: Adding Chinese
That is not the only problem; there is another problem where you can loose data if you don't change anything else in your database.
Some characters are longer than 20 bits and they will vanish in your content...
Some characters are longer than 20 bits and they will vanish in your content...
Artificial intelligence is not match for natural stupidity
- smithveg
- Joomla! Enthusiast
- Posts: 232
- Joined: Thu Jun 29, 2006 7:27 am
- Contact:
Re: Adding Chinese
Hi, joombler.
What should i do now? Any suggestion?
What should i do now? Any suggestion?
You do not have time to think about failure.
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65
Signature Rules: http://forum.joomla.org/viewtopic.php?f=8&t=65
-
- Joomla! Apprentice
- Posts: 30
- Joined: Mon Aug 06, 2007 6:05 pm
Re: Adding Chinese
Hello, Did you solve your problem? If so, could you give me some advice? I encounter the same problem as well...
joombler wrote: That is not the only problem; there is another problem where you can loose data if you don't change anything else in your database.
Some characters are longer than 20 bits and they will vanish in your content...
-
- Joomla! Fledgling
- Posts: 2
- Joined: Mon May 21, 2007 3:10 pm
Re: Adding Chinese
hi,
if u see chinese translation for the text but not for title and subtitle, ur problem can come from the php htmlspecialchar() function used in the core!
u need to find where article title and subtitle are displayed like in /components/com_content/content.html.php and toggle the htmlspecialschar function!
for example: change
name, ENT_QUOTES ); ?>
to name,; ?>
after what u have to be carrefull to not insert directly or not html tag or special characters like > or < in ur title or subtitle!!!!
good luck iam looking for a better solution!
Marco
if u see chinese translation for the text but not for title and subtitle, ur problem can come from the php htmlspecialchar() function used in the core!
u need to find where article title and subtitle are displayed like in /components/com_content/content.html.php and toggle the htmlspecialschar function!
for example: change
name, ENT_QUOTES ); ?>
to name,; ?>
after what u have to be carrefull to not insert directly or not html tag or special characters like > or < in ur title or subtitle!!!!
good luck iam looking for a better solution!
Marco
- samuelma
- Joomla! Apprentice
- Posts: 42
- Joined: Mon Sep 10, 2007 2:59 am
- Location: Singapore
- Contact:
Re: Adding Chinese
i have a similiar problem. the content can be displayed correctly yes, but the title cannot.smithveg wrote: Me too..
I would like to add some chinese content into my site.
The content can be write and display in chinese. But the content title, and title alias cannot.
I do try to change the collation in database to utf8. It seems cannot work. Anyone help?
After saving "北海". It will become "w&×"
Any suggestion?
Signature Rules: http://forum.joomla.org/index.php/topic,65.0.html
-
- Joomla! Apprentice
- Posts: 6
- Joined: Fri Dec 14, 2007 4:05 am
Re: Adding Chinese
修改 /index.php ,把encoding 和 charset都设置为 utf-8
修改 /includes/database.php ,把 "@mysql_query("SET NAMES 'utf8'", $this->_resource);" 去掉。
In English:
modify /index.php, set the value of both encoding and charset to be utf-8
modify /includes/database.php file, delete the two "/"s in "//@mysql_query("SET NAMES 'utf8'", $this->_resource);"
修改 /includes/database.php ,把 "@mysql_query("SET NAMES 'utf8'", $this->_resource);" 去掉。
In English:
modify /index.php, set the value of both encoding and charset to be utf-8
modify /includes/database.php file, delete the two "/"s in "//@mysql_query("SET NAMES 'utf8'", $this->_resource);"
- samuelma
- Joomla! Apprentice
- Posts: 42
- Joined: Mon Sep 10, 2007 2:59 am
- Location: Singapore
- Contact:
Re: Adding Chinese
are you sure that this can work??cnNicholas wrote: 修改 /index.php ,把encoding 和 charset都设置为 utf-8
修改 /includes/database.php ,把 "@mysql_query("SET NAMES 'utf8'", $this->_resource);" 去掉。
In English:
modify /index.php, set the value of both encoding and charset to be utf-8
modify /includes/database.php file, delete the two "/"s in "//@mysql_query("SET NAMES 'utf8'", $this->_resource);"
Signature Rules: http://forum.joomla.org/index.php/topic,65.0.html
-
- Joomla! Apprentice
- Posts: 10
- Joined: Sat Sep 23, 2006 12:39 am
Re: Adding Chinese
Hi, I'm using Joomla! 1.0.13, and I too can display chinese characters in main content, but not in menu items
I've tried the above method (couldn't find anything to change in index.php so left it alone) to no avail, and don't really want to start messing with the core.
I finally discovered that 1.x.x is not utf-8 compatible, and a link to a potential workround where some of the above info came from, although it's not worked for me: http://help.joomla.org/component/option ... temid,268/
I'd like to know if this is fixed in a more recent Joomla! release, as I can't find any info other than 1.5 is supposed to be entirely utf-8 compatible?
Thanks in advance for any information,
Neil

I've tried the above method (couldn't find anything to change in index.php so left it alone) to no avail, and don't really want to start messing with the core.
I finally discovered that 1.x.x is not utf-8 compatible, and a link to a potential workround where some of the above info came from, although it's not worked for me: http://help.joomla.org/component/option ... temid,268/
I'd like to know if this is fixed in a more recent Joomla! release, as I can't find any info other than 1.5 is supposed to be entirely utf-8 compatible?
Thanks in advance for any information,
Neil