I have the following string sent to the server by a client:
3%D3%E1f%7C%AF%B0a%B58%81%92%F9M%90%0CD%A0Y%9C // string in the actual URL
3Óáf|¯°aµ8’ùMD Yœ // var_dump($_GET)
The original string should be:
33D3E1667CAFB061B5388192F94D900C44A0599C
My problem is that I can't figure out how to encode/decode this so I can peform a database search because the collation type does not match. I have tried to urlencode/urldecode, mb_string_convert, utf8_encode, iconv, but without luck. Any ideas ?
Laravel throws the following exception when trying to use the string for searching:
'SQLSTATE[HY000]: General error: 1267 Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8_general_ci,COERCIBLE)...
I have no control of what the client's encoding is. The strange value is from logging it to a log file using Laravel's Log::imfo()