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. Link to comment https://forums.phpfreaks.com/topic/58463-php-mysql/ 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. Link to comment https://forums.phpfreaks.com/topic/58463-php-mysql/#findComment-289907 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. Link to comment https://forums.phpfreaks.com/topic/58463-php-mysql/#findComment-289909 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!) Link to comment https://forums.phpfreaks.com/topic/58463-php-mysql/#findComment-289911 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. Link to comment https://forums.phpfreaks.com/topic/58463-php-mysql/#findComment-289919 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.