Wrong Character Encoding while parsing PLSQL collections in JSP pages but not in JAVA classes
===

For two weeks i'm just trying to upgrade a jsp application to run in **weblogic 12c** that is using **JDK 1.6**, additionally in library folder  **ojdbc6.jar,orai18n**.jar (for internationl languages) are included. 

The huge software has thousands of **jsp** pages and in these pages **PLSQL collections** are used. The problem is that whenever i just create a java class with a main, and then call the PLSQL collection and get the results,  everything is fine, both **String and integer** is in correct format (no encoding problem), however when i paste the **same code** in jsp pages  and get from resultset and put them in a table, i see that **Strings** are in a form of ??? (3 question marks).

As an example

> 111, ???, 1, ???

 should be: 
>  111, beck, 1, beckC

The original code is written in **windows-1251**, and i changed it by using netbeans to UTF-8. this caused lots of problems but mostly wrong encoded characters can be changed later by using some tools, i guess.

Ok. to be concise i will paste some part of the code and try to **show encoding problem of returned String values from Oracle 11g** database that is occurred only in **jsp pages** : 

here is the PLSQL code: 

    create or replace parameter as object (
      x_ number, 
      y_ varchar2(10),
    );

    create or replace parameter_list as table of parameter;

        procedure find_parameter( p_parameter_name IN VARCHAR2, p_parameter_table OUT parameter_list )
         IS
         ...
         ...

and here how it is parsed in **.java** (no ??? are seen) and **jsp pages** (results in Strings as ???)

    CallableStatement csmt = conenection.prepareCall(...);
    //registerOutparameters
    //object 3 is our parameter_list
    array=cstmt.getObject(3);
    Resultset rs = array.getResultSet()
    while (rs.next){
    Struct obj = (Struct) rs.getObject(2);
    Object[] attrs = gobj.getAttributes();
    String parameter_name = String attrs[1];
    //..
    }

and jsp pages are constructed as follows, when i run the .jsp page the output of Strings from PLSQL collections are seen as ??? at the browser:

    <%@ page contentType="text/html;charset=utf-8" %>
    <HTML>
    <BODY>
        // the code above is called and put in html tables.
    </BODY>
    </HTML>

Any idea how to approach this kind of problem is appreciated, i think that the problem can be handled by using a trick in jsp pages  but i'm not jsp expert, i start coding web applications using JSF 1.2.

thanks.


