In addition to yannikh's note, to convert a hex utf8 string
<?php
echo utf8_decode("\x61\xc3\xb6\x61");
// works as expected
$abc="61c3b661";
$newstr = "";
$l = strlen($abc);
for ($i=0;$i<$l;$i+=2){
$newstr .= "\x".$abc[$i].$abc[$i+1];
}
echo utf8_decode($newstr);
// or varieties of "\x": "\\x" etc does NOT output what you want
echo utf8_decode(pack('H*',$abc));
// this outputs the correct string, like the first line.
?>