I found a urlRawDecode function that worked great on windows, but not on Linux.
I found JavaScript code here, but calling it was just another problem.
At the end, I store my data as the full gobblygook, and then "fix it" on the display. For display, I set my header to utf-8 using
header('Content-type: text/html; charset=utf-8');
and call urldecode on the string. That fixes everything except the + symbol and, since it's just a quick and dirty check of queries from google, I just str_replace them with spaces.
No comments:
Post a Comment