MindscapeHQ/raygun4php — pull request #35 by mrardon (2013-12-11 01:11:50+00:00)
Title: Strip invalid UTF8 $_SERVER values

This introduces a mbstring library requirement. So it may not be a good merge candidate but wanted to detail the issue. (utf8_decode may also handle it and am not sure if it introduces the mbstring requirement)

A little more in-depth on what is going on in my use case.

We use MaxMind's geoip to add server variables for country/city/etc. Sao Paulo has an accent over the a (ala São Paulo). Not sure if MaxMind is the issue or what but thousands of errors are showing up in Raygun due to our uptime monitor being located in São Paulo and everytime it tries to json_encode it throws up with "invalid UTF-8 sequence".

This is what MaxMind GeoIP shows: S\xe3o Paulo.

Let's discuss how we can handle this so these false positive errors go away and I can clean up my Raygun dash. Another alternative may be to allow me to ignore those variables the same way that you could white/blacklist per my other feature request #32.

Thanks!