I've been scouring Google and can't seem to find an answer. I'm running Oracle 10g Enterprise with the following character-set: AR8MSWIN1256
The database holds English and Arabic values, and I need to differentiate between the two from time to time. I wrote this script, which matches on English words but not on Arabic words:
create or replace function GET_LANGUAGE (v_value in varchar2)
return varchar2 as
begin
if (REGEXP_LIKE(v_value, '[\x00-\x7F]+')) then
return 'ENGLISH';
-- Arabic
elsif (REGEXP_LIKE(v_value, '[\xA0-\xF2]+')) then
return 'ARABIC';
else
return 'UNKNOWN';
end if;
end;
Any suggestions? Thanks!