I want to make an Oracle function to remove 'garbage' from user input values, but there's also a requirement that users may enter Unicode text which I'm supposed to leave as is.
REGEXP_REPLACE (search_text, '[^0-9A-Za-z]', '')
takes care of non-Unicode, how can I check that varchar2 value contains Unicode characters?
Looks like I could compare results of LENGTH(search_text)
and LENGTHB(search_text)
to find whether characters take more than 1 byte. Is there a better way of doing it?