How can I evaluate whether a column contains any non-ascii characters in mysql? In this case the charset is actually latin1, so I’m just looking for high-byte chars.
I tried this:
select * from company where ticker regexp concat('[', x'7f', '-', x'ff', ']')
but this returns this error:
ERROR 1139 (42000): Got error ‘invalid character range’ from regexp
There must be an easier way to do this, but all the typical escapes I thought would work, didn’t. So here is one, ugly solution: