cmgmyr Posted April 2, 2008 Share Posted April 2, 2008 I have a database that will eventually have to be used for english, russian, spanish, and a few other languages. Right now I'm adding the russian to it, but when it outputs to the PHP page all I get are question marks. It's showing correctly in phpMyAdmin, but not when it's echoed. Can anyone point me in the right direction? Thanks, -Chris Quote Link to comment https://forums.phpfreaks.com/topic/99241-solved-russian-text-in-mysql-and-php/ Share on other sites More sharing options...
effigy Posted April 2, 2008 Share Posted April 2, 2008 Are you using UTF-8 across the board--in your table, meta tag, and during PHP's connection to MySQL? Quote Link to comment https://forums.phpfreaks.com/topic/99241-solved-russian-text-in-mysql-and-php/#findComment-507773 Share on other sites More sharing options...
cmgmyr Posted April 2, 2008 Author Share Posted April 2, 2008 I have the database and the table set to utf8_unicode_ci this in the header file <meta http-equiv="content-type" content="text/html; charset=utf-8" /> and this right after the database connection $db->query('SET NAMES cp866'); Quote Link to comment https://forums.phpfreaks.com/topic/99241-solved-russian-text-in-mysql-and-php/#findComment-507839 Share on other sites More sharing options...
effigy Posted April 2, 2008 Share Posted April 2, 2008 How about: SET NAMES 'utf8' SET CHARACTER SET utf8' Quote Link to comment https://forums.phpfreaks.com/topic/99241-solved-russian-text-in-mysql-and-php/#findComment-507863 Share on other sites More sharing options...
cmgmyr Posted April 2, 2008 Author Share Posted April 2, 2008 awesome! worked like a charm! thanks!!! Quote Link to comment https://forums.phpfreaks.com/topic/99241-solved-russian-text-in-mysql-and-php/#findComment-507866 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.