Thursday, April 27, 2017

Oracle SQL to validate non-english characters


We had a requirement to validate non-english characters in the data.

Well, i used standard function regexp_like(column, '[A-Z]')   considering those characters which are not replaced by this function are non-english, to my surprise it is not considering turkish characters.

select REGEXP_replace(UPPER('rn Aıklaması'), '[A-Z]','')Test from dual ;











Alternate Solution for this problem is  using : asciistr Function

If input is equal to asciistr function, then it is non-english.

select count(*) from dual where  'ĞEĞİK' <> asciistr('ĞEĞİK') ;






No comments: