shane18 Posted November 17, 2009 Share Posted November 17, 2009 I'm trying to make my php files connect to my mysql server using UTF-8, and I want all my data stored in UTF-8 and I want my mysql server fully in UTF-8... +so far i got all my databases, tables, columns in utf8_unicode_ci -to make data stored in utf8 +and i use mysql_query("SET NAMES 'utf8'"); -to connect from my php files to mysql in utf8 am I missing any other steps or settings? can someone also explain how the php client and mysql interact character set wise... any input from anyone would be awesome Quote Link to comment https://forums.phpfreaks.com/topic/181876-character-set-setup/ Share on other sites More sharing options...
cags Posted November 17, 2009 Share Posted November 17, 2009 You may also want "SET CHARACTER SET 'utf8'", then obviously you just need to make sure the character encoding of the page is correct. Using either the HTML meta tag or alternatively the header function will achieve this. Quote Link to comment https://forums.phpfreaks.com/topic/181876-character-set-setup/#findComment-959218 Share on other sites More sharing options...
shane18 Posted November 17, 2009 Author Share Posted November 17, 2009 "SET CHARACTER SET 'utf8'" ???? explain please? Quote Link to comment https://forums.phpfreaks.com/topic/181876-character-set-setup/#findComment-959359 Share on other sites More sharing options...
cags Posted November 17, 2009 Share Posted November 17, 2009 http://dev.mysql.com/doc/refman/5.1/en/charset-connection.html Use it the same as SET NAMES. Quote Link to comment https://forums.phpfreaks.com/topic/181876-character-set-setup/#findComment-959364 Share on other sites More sharing options...
fenway Posted November 19, 2009 Share Posted November 19, 2009 See here. Quote Link to comment https://forums.phpfreaks.com/topic/181876-character-set-setup/#findComment-960978 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.