International Language in MySQL

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785

International Language in MySQL

Postby jay711 » Thu Jun 09, 2005 1:43 am

I'm trying to set up a Thai web site. However, when save it convert the text from Thai to something like this

พวกวัยรุ่นชอบตีกันน่ะ คนไม่รู้อิโหน่อิเหน่โดนหางเลขประจำ ไม่บาดเจ็บก็เสียชีวิต ล่าสุดได้ข่าวว่าเอาไม้ฟาดคุณยายล้มทั้งยืนเลย.. ไม่ชอบเลย บางครั้งเดิน ๆ


That was a one sentence. The message is safe and get display perfectly. But the topic can't be save because it's too long. So it's only save like

พวกวัยรุ่นชอบตีกันน่ะ &#

which is not even 4 word.

How can I make MySQL save the Thai character instead of this special code. I don't want to exten the topic field length.

Thanks.
jay711
Registered User
 
Posts: 6
Joined: Thu Jun 09, 2005 1:39 am

Postby espicom » Thu Jun 09, 2005 3:25 am

Your problem is that the title/subject field is only 60 bytes long in the database, and Thai requires two bytes per character, so it has a 30-character limit.

To fix that, you can use this SQL command:

Code: Select all
ALTER TABLE phpbb_posts_text CHANGE `post_subject` `post_subject` VARCHAR( 254 ) DEFAULT NULL;


That will give you 128 characters to work with.
Jeff
Fixing 1016/1030/1034 Errors | (obsolete link) | MySQL 4.1/5.x Client Error | phpBBv2 Logo in ACP
Support requests via PM are ignored!
"To be fully alive is to feel that everything is possible." - Eric Hoffer
User avatar
espicom
Registered User
 
Posts: 17906
Joined: Wed Dec 22, 2004 1:14 am
Location: Woodstock, IL


Return to 2.0.x Support Forum

Who is online

Users browsing this forum: No registered users and 5 guests