How to put traditional Chinese text into Unicode Oracle 9i database via Internet Explorer - JDBC JAVA

This is a discussion on How to put traditional Chinese text into Unicode Oracle 9i database via Internet Explorer - JDBC JAVA ; Hello wisers, We are testing a system which is developed on top of Oracle 9iAS. The client PCs are using Internet Explorer to access the system. We are sure that the Oracle 9i database server is set to use Unicode. ...

+ Reply to Thread
Results 1 to 2 of 2

How to put traditional Chinese text into Unicode Oracle 9i database via Internet Explorer

  1. Default How to put traditional Chinese text into Unicode Oracle 9i database via Internet Explorer

    Hello wisers,

    We are testing a system which is developed on top of Oracle 9iAS. The
    client PCs are using Internet Explorer to access the system. We are
    sure that the Oracle 9i database server is set to use Unicode. The
    Oracle 9i database server and Oracle 9iAS server are now running on
    English Windows 2000 server. With client PCs running on traditional
    Chinese Windows 2000 or traditional Chinese Windows XP, via Internet
    Explorer we put traditional Chinese text into the system then query the
    data again, it displays in inverted question marks.

    1. How to resolve the problem?
    2. Does the Internet Explorer View -> Code Unicode (UTF-8) setting
    controls content display as well as keyin?
    3. Or the system controls the code interpretation of keyin?
    Thanks,

    Bruce


  2. Default Re: How to put traditional Chinese text into Unicode Oracle 9i databasevia Internet Explorer

    bjwang@acs.com.tw wrote:
    > Hello wisers,
    >


    I think in your web-app you should use Filter, which will calls
    request.setCharacterEncoding("WhatDoYouWant") because overwise,
    according to spec, server should set request encoding to iso-8859-1.

    There is an example:

    import java.io.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;

    public class CharsetFilter implements Filter
    {
    // charset
    private String encoding;

    public void init(FilterConfig config) throws ServletException
    {
    // read from config
    encoding = config.getInitParameter("requestEncoding");

    // default
    if( encoding==null ) encoding="UTF8";
    }

    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain next)
    throws IOException, ServletException
    {
    request.setCharacterEncoding(encoding);
    next.doFilter(request, response);
    }

    public void destroy(){}
    }


    And configuration:

    <!-- CharsetFilter -->
    <filter>
    <filter-name>Charset Filter</filter-name>
    <filter-class>CharsetFilter</filter-class>
    <init-param>
    <param-name>requestEncoding</param-name>
    <param-value>UTF8</param-value>
    </init-param>
    </filter>

    <!-- CharsetFilter mapping -->
    <filter-mapping>
    <filter-name>Charset Filter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>


    Hope this helps.

    --
    WBR,
    Serge.


+ Reply to Thread

Similar Threads

  1. Replies: 1
    Last Post: 09-16-2007, 10:22 PM
  2. Unicode chinese
    By Application Development in forum Java
    Replies: 24
    Last Post: 08-31-2007, 05:10 AM
  3. Replies: 0
    Last Post: 08-21-2007, 05:51 PM
  4. connecting access database with internet explorer
    By Application Development in forum ADO DAO RDO RDS
    Replies: 0
    Last Post: 03-28-2006, 04:45 PM
  5. no oracle in Database Explorer in VS 2005 express
    By Application Development in forum DOTNET
    Replies: 6
    Last Post: 11-17-2005, 08:29 PM