obay Posted September 12, 2009 Share Posted September 12, 2009 Hi all, I have a weird problem with foreign characters in PHP + MySQL. For example, the query: INSERT INTO names VALUES ('ñame') is saved as: ñaame The names table is utf8_general_ci and the column is utf8_unicode_ci What's wrong?? Quote Link to comment https://forums.phpfreaks.com/topic/174021-solved-foreign-characters-dont-get-saved-properly/ Share on other sites More sharing options...
Zyx Posted September 12, 2009 Share Posted September 12, 2009 And how about the connection encoding? Are you saving the data from a form? If yes, have you set the proper charset? Quote Link to comment https://forums.phpfreaks.com/topic/174021-solved-foreign-characters-dont-get-saved-properly/#findComment-917334 Share on other sites More sharing options...
obay Posted September 12, 2009 Author Share Posted September 12, 2009 i set the charset properly <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> Quote Link to comment https://forums.phpfreaks.com/topic/174021-solved-foreign-characters-dont-get-saved-properly/#findComment-917361 Share on other sites More sharing options...
obay Posted September 13, 2009 Author Share Posted September 13, 2009 Solved this by changing the charset to ISO-8859-1 Quote Link to comment https://forums.phpfreaks.com/topic/174021-solved-foreign-characters-dont-get-saved-properly/#findComment-917637 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.