
--alter system set global_names=true scope=both;

CREATE OR REPLACE FUNCTION 
               JavaConvertEN2THchar (
                  p_name char
               ) return char
            AS language java name
               'JavaConverter.convertEN2TH( 
                  java.lang.String 
                ) 
                return java.lang.String';
/

CREATE OR REPLACE FUNCTION 
               JavaConvertBychar (
                  p_name char , 
                  p_input varchar2 ,
                  p_output varchar2 
               ) return char
            AS language java name
               'JavaConverter.convert( 
                  java.lang.String ,
                  java.lang.String ,
                  java.lang.String 
                ) 
                return java.lang.String';
/

CREATE OR REPLACE FUNCTION 
               JavaConvertEN2THvarchar (
                  p_name varchar2 
               ) return varchar2
            AS language java name
               'JavaConverter.convertEN2TH( 
                  java.lang.String 
                ) 
                return java.lang.String';
/

CREATE OR REPLACE FUNCTION 
               JavaConvertByVarchar (
                  p_name varchar2 , 
                  p_input varchar2 ,
                  p_output varchar2 
               ) return varchar2
            AS language java name
               'JavaConverter.convert( 
                  java.lang.String ,
                  java.lang.String ,
                  java.lang.String 
                ) 
                return java.lang.String';
/


CREATE OR REPLACE FUNCTION 
               JavaConvertEN2TH (
                  p_name varchar2 
               ) return varchar2
            AS language java name
               'JavaConverter.convertEN2TH( 
                  java.lang.String 
                ) 
                return java.lang.String';
/

CREATE OR REPLACE FUNCTION 
               JavaConvertBy (
                  p_name varchar2 , 
                  p_input varchar2 ,
                  p_output varchar2 
               ) return varchar2
            AS language java name
               'JavaConverter.convert( 
                  java.lang.String ,
                  java.lang.String ,
                  java.lang.String 
                ) 
                return java.lang.String';
/

-- NLS = WE8MSWIN1252 , Java = ISO-8859-1
-- NLS = TH8TISASCII , Java = TIS-620

--ALTER SYSTEM SET global_names = false SCOPE = BOTH;
--ALTER SYSTEM SET db_domain = '' SCOPE = BOTH;
--UPDATE GLOBAL_NAME SET GLOBAL_NAME = 'ORCL';
