asmith Posted August 17, 2008 Share Posted August 17, 2008 Hey guys In some utf files (persian) , I see the word "عنوان" is written like "عنوان" . What is it call ? what's the function that convert "عنوان" to "عنوان" ?? THanks a lot Link to comment https://forums.phpfreaks.com/topic/120064-finding-the-binaryhex-code-of-a-utf-character/ Share on other sites More sharing options...
Mchl Posted August 17, 2008 Share Posted August 17, 2008 http://en.wikipedia.org/wiki/Unicode_and_HTML Link to comment https://forums.phpfreaks.com/topic/120064-finding-the-binaryhex-code-of-a-utf-character/#findComment-618513 Share on other sites More sharing options...
asmith Posted August 17, 2008 Author Share Posted August 17, 2008 Thanks for the link. It is called HTML char (reference). But still didn't find any function in PHP. Link to comment https://forums.phpfreaks.com/topic/120064-finding-the-binaryhex-code-of-a-utf-character/#findComment-618692 Share on other sites More sharing options...
DeanWhitehouse Posted August 17, 2008 Share Posted August 17, 2008 Can you not just set the charset to utf-8, and wouldnt this top any problem? Link to comment https://forums.phpfreaks.com/topic/120064-finding-the-binaryhex-code-of-a-utf-character/#findComment-618695 Share on other sites More sharing options...
asmith Posted August 17, 2008 Author Share Posted August 17, 2008 i wish so. The file is written by someone else. my problem is, I have an array. It has like 300 values. all values are like "عنوان" (html numeric char) the array values are a html form select options. like : foreach ($array as $value) { echo <option value="$value" $selected>$value</option> } the thing is , in the foreach i'm putting : If ($value == $row[option]) { $selected = "selected"} now my $row[option] is "عنوان" . but the option that must match is "عنوان" . So i need to convert "عنوان" to html numeric char first , then do the IF statement. All i need is te function :/ mb_decode_numericentity and encode one do not work in my php version apparently :/ Link to comment https://forums.phpfreaks.com/topic/120064-finding-the-binaryhex-code-of-a-utf-character/#findComment-618718 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.