eevan79 Posted February 15, 2011 Share Posted February 15, 2011 I do not know how many times was this question, but simply can not solve it. Field in database: Type: mediumtext Collation: utf8_bin When I insert text like: ŽĆČĐĆ I get this: ŽĆČÄĆ I have tried various solution but none works. Also tried to change php file encoding: UTF8, UTF8 without BOM, ANSI, Different character sets but no results. How to insert this latin characters into database? Link to comment https://forums.phpfreaks.com/topic/227779-strange-characters-in-database-utf8/ Share on other sites More sharing options...
eevan79 Posted February 15, 2011 Author Share Posted February 15, 2011 Ok it seems that I have solve it. In my class database handler I have added following code: $result = $db->query("SET NAMES 'utf8'"); And now everything works fine. Is there any other solution? Link to comment https://forums.phpfreaks.com/topic/227779-strange-characters-in-database-utf8/#findComment-1174644 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.