asmith Posted January 21, 2009 Share Posted January 21, 2009 Hi, its been a while I'm looking for this function where converts 'سلام' to 'سلام' I thought it is htmlspecialchars but no success. Actually I have 'سلام' and I need to convert it back to the arabic characters. Any idea? Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/ Share on other sites More sharing options...
Mark Baker Posted January 21, 2009 Share Posted January 21, 2009 iconv() or mbstring_convert_encoding() Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742090 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 htmlspecialchars encode html you want to decode html try html_entity_decode() ie echo html_entity_decode("سلام"); Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742091 Share on other sites More sharing options...
asmith Posted January 21, 2009 Author Share Posted January 21, 2009 @ mark baker, My version of php does not support this mbstring_convert_encoding(). Can you show me the example? @ MadTechie the word 'سلام' is being viewed properly on the page. But when I view the the page source it is still سلام even echo "سلام"; , shows 'سلام' fine on te page, but still in the page source it is viewed by that. I wanna have it change in the page source too. html_entity_decode() seems to do nothing with "سلام" Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742109 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 try this you must have the Content-type set to UTF-8 See Next post this site is messing it up EDIT: okay take out the & this site seam to add them!! Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742114 Share on other sites More sharing options...
MadTechie Posted January 21, 2009 Share Posted January 21, 2009 See attached [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742118 Share on other sites More sharing options...
asmith Posted January 21, 2009 Author Share Posted January 21, 2009 wow you nailed it I gotta go through it as there's some line I don't get, But my job to understand Thanks A TON for that. I see you have used hexdec there ^^ I have a question about this hex and binary things, its first time I'm working with them. I started a thread 2 days ago, but no answer. Do you mind take look at it? http://www.phpfreaks.com/forums/index.php/topic,234737.0.html Quote Link to comment https://forums.phpfreaks.com/topic/141763-solved-help-find-this-function/#findComment-742129 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.