Zoranos Posted March 9, 2012 Share Posted March 9, 2012 Hi, i dont know what to do, everything is ok in php, but when i query some values that have utf8 sign mysql server store this sings strange... query('UPDATE clanstvo SET name='Špica' WHERE id=1'); // its ok in mysql when debug and echo this query: UPDATE clanstvo SET name='Špica' WHERE id=1 but when i look in phpmyadmin i see that has stored like: Špica when i query back this value and echo in php its Špica again :S but problem is that i use this database to connect web cms with game server(few) and that is problem... i only want that is stored like Špica in mysql... after mysql_connect i have tryied mysql_set_charset('utf8'); and mysql_query('SET NAMES utf8'); and didnt helped... does anyone have solution? Quote Link to comment https://forums.phpfreaks.com/topic/258610-php-mysql_query-and-utf8-problem/ Share on other sites More sharing options...
Psycho Posted March 9, 2012 Share Posted March 9, 2012 The problem is likely NOT the database but the PHPMyAdmin web application is not displaying UTF8 characters correctly. Quote Link to comment https://forums.phpfreaks.com/topic/258610-php-mysql_query-and-utf8-problem/#findComment-1325673 Share on other sites More sharing options...
Zoranos Posted March 9, 2012 Author Share Posted March 9, 2012 The problem is likely NOT the database but the PHPMyAdmin web application is not displaying UTF8 characters correctly. yes, i forund problem, htmlentities with utf8 was problem, i only switched to htmlspecialchars with utf8 and solved...stupid utf8 signs... problem solved... Quote Link to comment https://forums.phpfreaks.com/topic/258610-php-mysql_query-and-utf8-problem/#findComment-1325677 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.