Unfortunately my experience with encodings and charsets is limited to mostly latin and russian charsets. For what I understand by looking at PHP's manual pages, it looks like there's no way to detect the original charset of a string like, for example
In my case, for example, my test environment tells me that this string is compatible with EUC-JP (Japanese) but the right charset is EUC-CN. If you or someone could point me into the right direction to reliably detect the charset of a string, then I can definitely implement that into WP SlimStat's code.
The only way I see, at the moment, is to check for EVERY search engine out there what charset they use to encode the URL of their result pages. And this list should be kept up-to-date. This is the list of search engines currently detected by WP SlimStat (if none matches, an heuristic match is done to find the search string)