I am trying to GET values from url
and I have ended up with a problem in IE
but all other browsers it works great.
This is my issue:
If text is some UTF-8 text as example:
$x=$_GET['txt'];
echo $x;
I got
???????
only in IE
still same problem and this is my all code
<?php
header('Content-Type: text/html; charset=utf-8');
$x=$_GET['id'];
echo $x;
?>
try with this word in id
سسسسسسس
You can put this meta tag inside the
<head>if it’s a charset issue (as an alternative to usingheaderinside PHP):UPDATE
If you’re not encoding the value of
xfrom the URL you should do something like:Using your sample text (سسسسسسس), once that’s encoded using
urlencodeit should like this:I got it working by adding a charset meta tag and doing a simple
urldecode:See screenshot on IE:
