MySQL Forums
Forum List  »  PHP

Re: Asian language problems
Posted by: James Hill
Date: March 04, 2009 04:25PM

Hi Rick, right I've tried everything you mentioned and here are the results.

I looked up SET NAMES and have attempted:

mysql_query ('SET NAMES utf8');
mysql_query ('SET character_set_client = utf8');
mysql_query ('SET character_set_results = utf8');
mysql_query ('SET character_set_connection = utf8');

I recieved no errors, but also no difference in the result when I INSERT the japanese text.

There is nowhere in the script that uses htmlentities(), I can see what you mean though, but I just don't see where that would be coming from.

I tried :
SELECT length(col), char_length(col), col FROM TABLE ...;

And both length() and char_length() returned back the same numbers.

SHOW CREATE TABLE returned:
CREATE TABLE `QuestionsJA` (\n `ID` varchar(10) collate utf8_unicode_ci NOT NULL default '',\n `QuestionText` text collate utf8_unicode_ci NOT NULL,\n `AnswerText` text collate utf8_unicode_ci NOT NULL,\n `Correct` varchar(10) collate utf8_unicode_ci NOT NULL default '',\n `Type` int(2) NOT NULL default '0',\n `QGroup` int(3) NOT NULL default '1',\n `Active` int(1) NOT NULL default '1',\n KEY `ID` (`ID`),\n FULLTEXT KEY `QuestionText` (`QuestionText`,`AnswerText`)\n) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci

As I say, if I use phpmyadmin to insert the text it goes in just fine, which would make me think the database itself is fine, and php is fine, but somewhere when I sent the text it's getting converted between the 2, it's so frustrating!

Any more help would be greatly appreciated

thanks
James

Options: ReplyQuote


Subject
Written By
Posted
February 27, 2009 07:53PM
February 28, 2009 03:11PM
Re: Asian language problems
March 04, 2009 04:25PM
March 04, 2009 10:49PM
March 05, 2009 11:39AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.