Could one of our iconv/charset people tell me what is going on with bug #590898 that the systems are generating weird queries like that ?
I think the best way to deal with things would be to ensure that weird stuff like that, which my copy of MySQL seems to reject itself even, would be to fix why the bad SQL is being generated, but failing that, I could work out a fix in my parser.