merlin371 Posted August 22, 2010 Share Posted August 22, 2010 Hey guys I'm having a bit of a problem trying to convert this string to UTF-8 encoding 組ですが、 中には5- 6本のおす すめ番組の エッセンス が、ぎっし り詰まって います。 I've used $strTem = mb_convert_encoding($strTem, "UTF-8", "auto"); and while that detects the correct current encoding it doesnt change it at all and utf8_encode doesnt work at all, dont know what to use. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/211415-convert-ascii/ Share on other sites More sharing options...
premiso Posted August 22, 2010 Share Posted August 22, 2010 The page where you are displaying the data also has to have the correct charset. Given that is all the code you have given I am not sure exactly what the problem is. Can you elaborate on "doesnt work at all". Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/211415-convert-ascii/#findComment-1102414 Share on other sites More sharing options...
merlin371 Posted August 22, 2010 Author Share Posted August 22, 2010 Sorry I'll give a better example, was reading again and noticed it makes no sense , look at this code $stringer = "A"; $str = mb_convert_encoding($stringer, "UTF-8", "ASCII"); echo $str; $stringer is A in ascii code, if i the code goes trough all the way it will of course output A on the browser but if you go look at the page source it's still A, were if i were to just replace stringer with the actual letter A the page source will show the letter A, what I'm trying to do is to get the script to convert the ascii code with the equivalent letter and output the letter over the code. If you get what i mean Thanks Quote Link to comment https://forums.phpfreaks.com/topic/211415-convert-ascii/#findComment-1102435 Share on other sites More sharing options...
Mchl Posted August 22, 2010 Share Posted August 22, 2010 These are not ASCII codes. These are HTML entities. Use html_entity_decode Quote Link to comment https://forums.phpfreaks.com/topic/211415-convert-ascii/#findComment-1102447 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.