I have recently had some visitors with the following useragent:
Mozilla/5.0 (Linux; U; Android 2.3.6; es-co; XT320 Build/GRK39F)
AppleWebKit/533.1 (KHTML, like Gecko) Versión/4.0 Mobile Safari/533.1
I insert these in a mysql table on a column that is utf8_general_ci . My PHP site is also served as UTF-8. Unfortunately, I have gotten some errors from these visitors as follows:
Incorrect string value: '\xF3n/4.0...' for column 'useragent' at row 1 [1366]
Hence it is the ó that is causing the problem. In my quest to resolve this, I changed the useragent of my firefox browser to this as well (with UA switcher plugin), but this gets inserted perfectly into my database.
So, my question: how is it possible that in some cases it's apparently not working? And how could this be resolved? I could of course just replace ó with o, but I would think this will not be the last special char I'll be encountering in the future...