Convert Hexadecimal Character from URL in php -
i want convert hexadecimal character urls (e.g. %c3%a4) "normal" utf8 character (e.g. ä) (like "hexadecimal codes characters" in hexadecimal character codes in url). how in php?
i tested following:
echo hexdec("%c3%a4"); // 50084 echo bin2hex("%c3%a4"); // 254333254134 echo dechex("%c3%a4"); // 0 echo pack('h*', "%c3%a4")"; //warning: pack(): type h: illegal hex digit % in ... warning: pack(): type h: illegal hex digit % in ... 51 0�
(i've convert word "w%c3%a4re" "wäre")
try this:
urldecode('%c3%a4');
Comments
Post a Comment