Vivid Lust Posted September 1, 2009 Share Posted September 1, 2009 I have an ajax script getting values from a database, the php script which gets the values displays the pound sign correctly, however the page which uses ajax to get this page displays it as the question mark. Any ideas on how i can resolve this? Thanks. Link to comment https://forums.phpfreaks.com/topic/172713-php-turning-%C2%A3-into-%EF%BF%BD/ Share on other sites More sharing options...
Mark Baker Posted September 1, 2009 Share Posted September 1, 2009 £ or set the page and all your data to UTF-8 Link to comment https://forums.phpfreaks.com/topic/172713-php-turning-%C2%A3-into-%EF%BF%BD/#findComment-910375 Share on other sites More sharing options...
Vivid Lust Posted September 1, 2009 Author Share Posted September 1, 2009 Hi, this doesnt work... is there any php .. or even javascript function i can wrap around the data to display it properly? Link to comment https://forums.phpfreaks.com/topic/172713-php-turning-%C2%A3-into-%EF%BF%BD/#findComment-910378 Share on other sites More sharing options...
Mark Baker Posted September 1, 2009 Share Posted September 1, 2009 Assuming that the character is actually stoerd as a £ on the database, then htmlentities($data) should convert it to £ Link to comment https://forums.phpfreaks.com/topic/172713-php-turning-%C2%A3-into-%EF%BF%BD/#findComment-910382 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.