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? 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() 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("سلام"); 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 "سلام" 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!! 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] 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 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
Archived
This topic is now archived and is closed to further replies.