1 Reply Latest reply: Mar 18, 2013 4:15 AM by gimbal2 RSS

    Creation-Character Problem

    997413

      Hi,

      I'm working on Oracle 8i,(nls_database_parameters = BIG5).
      I have a problem for PLSQL Call Java. Describe as below:

      Simply Java Code.
      ================================
      *public class hello {*
      *public static String world(String arg){*
      return arg;
      *}*
      *}*
      ================================

      And then I used the LOADJAVA tool , load the JAVA Code into the Oracle DB.


      PLSQL Function Code.
      =================================
      create or replace function TestFunc( p_string varchar2) return VARCHAR2

      as LANGUAGE JAVA name 'hello.world(java.lang.String) return java.lang.String';
      =================================



      case 1.
      select TestFunc('hello') from dual
      Output -> hello (It's correct)

      case 2. Passed a Big5 character (Std. Code:A448)
      select TestFunc('人') from dual
      Output -> 人 (It's correct)

      case 3. Passed a Creation Chinese character(Ex. Code:FA44)
      select TestFunc('X') from dual
      Output -> ? (It's not correct)


      About case3, I don't know that is about JDBC or JAVA problem?
      if i want to pass the creation-character correct.
      how to do?

      Does anyone can help me? or any ideas?
      Thanks.

        • 1. Re: Creation-Character Problem
          gimbal2
          Who says it is a Java problem? Character encoding problems can happen anywhere, most notably in the part that displays it. If you are using a font that doesn't support the glyphs, you won't get the output that you need for example. So it might even be the configuration of whatever tool you're using to see the data.

          Remember: there is a huge difference between data and the displaying of that data.