Jump to content

php mysql_query and utf8 - problem


Zoranos

Recommended Posts

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?

 

Link to comment
https://forums.phpfreaks.com/topic/258610-php-mysql_query-and-utf8-problem/
Share on other sites

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.