Created
March 1, 2017 14:04
-
-
Save RhodiumToad/2b5feb7114f7a805a07a2e30b3b0c32f to your computer and use it in GitHub Desktop.
UTF8 test query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from yourtable t | |
where encode(convert_to(t::text,'SQL_ASCII'),'hex') | |
!~ '(?x) | |
^(?:(?:[0-7][0-9a-f]) | |
|(?:(?:c[2-9a-f]|d[0-9a-f]) | |
|e0[ab][0-9a-f] | |
|ed[89][0-9a-f] | |
|(?:(?:e[1-9abcef]) | |
|f0[9ab][0-9a-f] | |
|f[1-3][89ab][0-9a-f] | |
|f48[0-9a-f] | |
)[89ab][0-9a-f] | |
)[89ab][0-9a-f] | |
)*$'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment