Re: regexp for unicode control chars
Posted by: Rick James
Date: July 23, 2011 01:28PM

This might work:
SELECT * FROM tbl WHERE HEX(msg) RLIKE '[[:cntrl:]]';

Are you using the character set "ucs2"?
<opinion>
For non-ascii text, "utf8" is essentially the only character set to use.
</opinion>

Please point me to a reference on the list of "control codes" you want to catch.

This will find any records with a utf8 code of the form (in hex) of 'C3xx':
SELECT * FROM tbl WHERE HEX(msg) RLIKE '^(..)*C3';

If you are really using ucs2, then something like
SELECT * FROM tbl WHERE HEX(msg) RLIKE '^(....)*xxxx';
will catch any msg with the control code xxxx (suitable hex).

Options: ReplyQuote


Subject
Views
Written By
Posted
5516
July 21, 2011 01:25AM
Re: regexp for unicode control chars
3012
July 23, 2011 01:28PM
2633
July 29, 2011 12:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.