Hey, guys, I have a problem.
I created a table with the following structure:
– Table structure for table news
–
CREATE TABLE news
(
NEWS_ID
int(11) NOT NULL auto_increment,
TITLE
varchar(50) collate utf8_unicode_ci NOT NULL,
CONTENT
text collate utf8_unicode_ci NOT NULL,
DATE_PUBLISHED
timestamp NOT NULL default CURRENT_TIMESTAMP,
PRIMARY KEY (NEWS_ID
)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Това е таблицата с новините' AUTO_INCREMENT=2 ;
I used consecutively:
model "news"
crud "news"
Thus, I got what I needed. I have a problem, though. I wrote a text in Bulgarian, because the site I will be developing will be in Bulgarian only. I wrote something a looked up in PHpMyAdmin. The content of the fields was:
1 Кво Ñтава пичове Съдържаниеце 0000-00-00 00:00:00
In fact, Yii shows them correctly in the list.php module, but they are filled in in a bad format in the database. What could be this caused by? I normally execute a query "SET NAMES utf8" after I open the connection, but is this the issue?
I don't say it is an Yii issue, but I am looking for an advice, because I haven't had such problems till now.
Penko