pedrobcabral Posted July 4, 2007 Share Posted July 4, 2007 I am from Portugal and we do use accents on the words. In the past it used to work okay between php and mySQL database. Now it just not works. I've tried on the PHP page UTF-8, ISO-8859-1. Different collations on the database, such as UTF8_roman_ci, the swedich default one. None of these does work, the query from the php page does not display the accents that are present on the database. What a pain, any help would be terrible appreciated, thank you. Quote Link to comment Share on other sites More sharing options...
corillo181 Posted July 4, 2007 Share Posted July 4, 2007 you need to use mysql_real_escape_string before you insert the words into mysql and stripslashes() when you echo them out. Quote Link to comment Share on other sites More sharing options...
pedrobcabral Posted July 4, 2007 Author Share Posted July 4, 2007 I do think that, that is intended to prevent mySQL injection. And I think it is not the case here, am I wrong? As I told you this worked few monthes before. I might be wrong, but I think is either a collation on database or charset on the page problem. Quote Link to comment Share on other sites More sharing options...
Yesideez Posted July 4, 2007 Share Posted July 4, 2007 I think you want to look at the character coding of the browser and the database. I've never altered from the default settings as my language has no accents and I've had no need to support them (well, I suppose I should really!) Quote Link to comment Share on other sites More sharing options...
pedrobcabral Posted July 4, 2007 Author Share Posted July 4, 2007 I've tried so many things, and my doubt still prevails. Help. 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.