Taz Posted September 16, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 6 Reputation: 1 Joined: 03/21/12 Last Seen: August 25 Share Posted September 16, 2013 What encoding need in table "vending" for correct Russian simbols? character name and vending name look as "����" Какую кодировку нужно ставить для созданной таблицы? все русские имена выглядят как вопросительные знаки Quote Link to comment Share on other sites More sharing options...
Sanasol Posted September 16, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 185 Reputation: 53 Joined: 01/04/12 Last Seen: May 3 Share Posted September 16, 2013 Можно утф-8, если не поможет попробуй cp1251 CREATE TABLE `vending` ( `char_id` int(11) unsigned NOT NULL DEFAULT '0', `name` varchar(50) DEFAULT NULL, `index` tinyint(3) unsigned NOT NULL DEFAULT '0', `nameid` int(11) unsigned NOT NULL DEFAULT '0', `amount` int(11) unsigned NOT NULL DEFAULT '0', `price` bigint(20) unsigned NOT NULL DEFAULT '0', `refine` tinyint(3) unsigned NOT NULL DEFAULT '0', `card0` smallint(11) NOT NULL DEFAULT '0', `card1` smallint(11) NOT NULL DEFAULT '0', `card2` smallint(11) NOT NULL DEFAULT '0', `card3` smallint(11) NOT NULL DEFAULT '0', PRIMARY KEY (`char_id`,`index`), KEY `char_id` (`char_id`), KEY `nameid` (`nameid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 Quote Link to comment Share on other sites More sharing options...
Taz Posted September 16, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 6 Reputation: 1 Joined: 03/21/12 Last Seen: August 25 Author Share Posted September 16, 2013 Попробовал и так, и так. Причем таблицу полностью удалял и создавал новую. В самой базе отображается нормально, а вывод хромает. Проблема аналогичная и в раскореженном мной моде на fluxcp, так и в нетронутой отдельной версии. Quote Link to comment Share on other sites More sharing options...
Sanasol Posted September 16, 2013 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 185 Reputation: 53 Joined: 01/04/12 Last Seen: May 3 Share Posted September 16, 2013 В конфиг после $db = new db("mysql:host={$host};dbname={$dbname}", $user, $pass); $db->setErrorCallbackFunction("print_r", "text"); добавь $db->run("set names utf8"); и таблицу в utf-8 оставь. Вот здесь так и работает http://ragnaok.net/vending_database/ Quote Link to comment Share on other sites More sharing options...
Taz Posted September 16, 2013 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 6 Reputation: 1 Joined: 03/21/12 Last Seen: August 25 Author Share Posted September 16, 2013 Большое спасибо, работает. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.