Is that what appears when you type in a form field, before submitting anything? Because if so, there is no UTF-8 in the problem. Strings at the web browser side are purely Unicode-based; it's only when you're moving them from the browser to the server or back that encoding matters come into play.
My guess would be a simple font problem. Clearly from your screenshot, Firefox is using a different font to IE, and perhaps that font is one without proper support for features necessary to Arabic like the contextual ligatures that take care of choosing the right glyph variant of each character. Check the stylesheets and use Firebug if necessary to find out what font is being applied to that input.
accept-charset="utf-8"
is basically no use, because IE handles it wrong. It uses UTF-8 as a fallback encoding (for characters that don't fit in the page's current charset) instead of the only encoding.
To get a form that submits in UTF-8, you must ensure that the page containing the form is served as text/html;charset=utf-8
using a Content-Type
header and/or <meta>
tag.
action="print $_SERVER['PHP_SELF'];"
I'm presuming you've mis-pasted that and the value is actually in a <?php ... ?>
tag, otherwise the form wouldn't work at all.
This is an HTML-injection hole, potentially leading to cross-site scripting attacks. You should always HTML-encode strings you are injecting into HTML text content or attribute values, using htmlspecialchars()
.