Hi.
I have the following in my application.ini:
resources.db.params.charset = "utf8"
My tables are created like this:
CREATE TABLE IF NOT EXISTS `v2_nodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`parentId` int(10) unsigned DEFAULT NULL,
`userId` int(10) unsigned NOT NULL,
`groupId` int(10) unsigned NOT NULL,
`weight` int(10) unsigned NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
When I write Unicode text into the database using my application I can read
it later using the application without problems. However if I use phpMyAdmin
to look at the data I will see garbage. For example, cyrillic letters "ТЕСТ"
become "ТЕСТ" (i. e. two bytes for every character). Text entered via
phpMyAdmin is rendered as line of question marks by the application. English
text is displayed correctly in both phpMyAdmin and my application. Browser
says both are in "Unicode (UTF-8)" encoding (I have
$view->setEncoding("UTF-8"); in my bootstrap).
Am I missing something? I don't know if it matters but currently I am
developing on Windows 7 using WAMP 2.0. I wonder will it work when I publish
the application on Linux server... And yes, I tried changing phpMyAdmin's
"MySQL connection collation"parameter on welcome page to different values
(currently utf8_unicode_ci) without success.