cohq82 Posted April 25, 2008 Share Posted April 25, 2008 I am writing a script to parse a unicode string to show on the screen in alert(). However, I don't know of a way to convert something like $text = "T& #236;m ki& #7871;m n& #226;ng cao"; into a unicode string within HTML so alert() can show the right thing. I use the function below but no luck. echo "<html><head>"; echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" /></head><body>"; echo mb_convert_encoding(html_entity_decode("T& #236;m ki& #7871;m n& #226;ng cao"), 'UTF-8');exit; The mbstring extension is enabled by the way! What can I do? Thanks Link to comment https://forums.phpfreaks.com/topic/102964-unicode-string-to-show-in-javascript-alert/ Share on other sites More sharing options...
cohq82 Posted April 28, 2008 Author Share Posted April 28, 2008 any idea please? Link to comment https://forums.phpfreaks.com/topic/102964-unicode-string-to-show-in-javascript-alert/#findComment-528614 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.