Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

character checking for arabic

Nitin ChauhanMay 5 2012 — edited May 5 2012
Hi

I have an issue with one function which used to work perfectly when the characterset of the database was al32utf8 ,
Now we have changed the characterset to ar8mswin1256 , due to use of arabic language in the application.

Below is the function
 

CREATE OR REPLACE FUNCTION fn_get_string_lang(pv_string VARCHAR2)
  RETURN VARCHAR2 AS
  v_str_type VARCHAR2(2):='E';
BEGIN
  FOR i IN 1..length(pv_string)
    LOOP
      IF (ascii(SUBSTR(pv_string,i,1)) > 256) THEN
        v_str_type := 'A';
        EXIT;
      END IF;
    END LOOP;
    RETURN v_str_type;
EXCEPTION
  WHEN OTHERS THEN
    insert_error(-123, SQLERRM, NULL, NULL, 'fn_get_string_lang');
    RETURN 'E';
END fn_get_string_lang;
In the above function we check if the characters entered are in arabic.... this used to work in al32utf8 , but nit now.

Please Help.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 2 2012
Added on May 5 2012
1 comment
632 views