mysql - encoding Romanian characters in php -
i have o problem encoding characters this: ĂăÂâÎîȘșȚț using following mysql table:
create table `news` ( `newsid` int(11) not null auto_increment, `userid` int(11) not null, `title` varchar(255) character set utf8 not null, `date` datetime not null, primary key (`newsid`), fulltext key `title` (`title`,`content`) ) engine=myisam auto_increment=1 default charset=utf8 collate=utf8_bin
i try insert upper mentioned character sequence in title
field using following code (runs on zend framework):
$params = $this->getrequest()->getparams(); $mysqli = new mysqli("localhost", "user", "pass", "database_name"); $mysqli->query("insert `news` (`newsid`, `title`) values (null, '".$params['text']."');");
and in database field title
following value: ÃãÂâÎîȘșȚț why these characters html encoded? , why aren't first characters encoded utf8_bin equivalent ? thanks.
be sure ide or text editor set use utf-8 characters.
Comments
Post a Comment