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?? 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? 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"> 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 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
Archived
This topic is now archived and is closed to further replies.