Q:

encoding Romanian characters in php

i have o problem encoding characters that look like this: ĂăÂâÎîȘșȚț
i am using the 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 to insert the upper mentioned character sequence in the Title field by using the following code (runs on zend framework):
$params = $this->getRequest()->getParams(); 
$mysqli = new mysqli("localhost", "user", "pass", "database_name");
$mysqli->query("INSERT INTO `news` (`NewsID`, `Title`) VALUES (NULL, '".$params['text']."');");

And in the database i get for the field Title the following value: ÃãÂâÎî&#536;&#537;&#538;&#539;
Why are these characters html encoded? And why aren't the first characters encoded to their utf8_bin equivalent ?
Thanks.

A:

In my case I just updated php db connection settings with the following line:
mysqli_set_charset( $con, 'utf8'); 

Also i added in html file meta http-equiv="content-type" content="text/html; charset=UTF-8"  as @liyakat mentioned.
Old thread, but maybe someone needs to know this.

