ricky spires Posted December 9, 2010 Share Posted December 9, 2010 hello. im having a strange issue with a file. my php page is working fine : <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> all £ signs look as they should but if i have a £ sign in a function it comes back as a ? in a diamond. this a short version of the function: function stopDeals() { echo ' <b>for only £7.83 p/m</b></span></p> '; } thankyou rick Quote Link to comment https://forums.phpfreaks.com/topic/221115-how-do-i-return-utf-8-from-a-function/ Share on other sites More sharing options...
bh Posted December 9, 2010 Share Posted December 9, 2010 Hi, try this: html_entity_decode("£", ENT_QUOTES, "UTF-8"); Quote Link to comment https://forums.phpfreaks.com/topic/221115-how-do-i-return-utf-8-from-a-function/#findComment-1144918 Share on other sites More sharing options...
ricky spires Posted December 10, 2010 Author Share Posted December 10, 2010 Thanks very much.. ill give it a try Quote Link to comment https://forums.phpfreaks.com/topic/221115-how-do-i-return-utf-8-from-a-function/#findComment-1145391 Share on other sites More sharing options...
OOP Posted December 10, 2010 Share Posted December 10, 2010 I tried your code and it is working without any issue? are you sure that you are including the <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> in all of your pages? Quote Link to comment https://forums.phpfreaks.com/topic/221115-how-do-i-return-utf-8-from-a-function/#findComment-1145448 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.