jaymc Posted July 10, 2008 Share Posted July 10, 2008 When a pound sign £ is passed into mysql_real_escape_string it is storing it as this £ Field type is varchar(65500) latin1_general_ci How can I stop this? Thanks Quote Link to comment Share on other sites More sharing options...
effigy Posted July 10, 2008 Share Posted July 10, 2008 You're working in UTF-8: http://www.phpfreaks.com/forums/index.php/topic,163936.0.html What's in your meta tag? Quote Link to comment Share on other sites More sharing options...
jaymc Posted July 10, 2008 Author Share Posted July 10, 2008 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> Ive just changed it to <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> And its still doing the same Quote Link to comment Share on other sites More sharing options...
effigy Posted July 10, 2008 Share Posted July 10, 2008 Where is the pound sign coming from? $_POST? Did you clear your cache? Is the server enforcing UTF-8? Quote Link to comment Share on other sites More sharing options...
jaymc Posted July 10, 2008 Author Share Posted July 10, 2008 Ah yes, MYSQL MySQL charset: UTF-8 Unicode (utf8) Is it wrong to be that by default? What should I change it too? Will changing it mess up existing data? Thanks Quote Link to comment Share on other sites More sharing options...
effigy Posted July 10, 2008 Share Posted July 10, 2008 In today's world I prefer to work everything in UTF-8; although, I rarely use Korean, Chinese, or Japanese and I hear these are preferable in other encodings. UTF-8 overlaps ISO-8859-1 (Latin-1), so if that's all you have, changing it should be transparent. Quote Link to comment 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.