Storing chinese characters on Oracle 8.0.6

My development environment is Oracle 8i (8.1.5), with a database setup with langange/territory/charset as /American/America/US7ASCII. I use the 8i jdbc thin driver in my servlet to store chinese characters to the database and everything is fine. However, in the production environment, somehow I need to use oracle 8.0.6 and the database nls setup is American/America/WEC8DEC, but some (not all) could not be displayed. Is this the wrong nls setup, or due to jdbc driver (8.0.6). Please help!

Neither your database character set nor your national character set support Chinese characters. Both character sets are set to use the ISO 8859 character set, which only stores English and Western European characters.
If you want to store Chinese characters in this database, you will need to use a character set that supports Chinese (i.e. one of the Unicode character sets). Since there are no Chinese character sets that are strict binary supersets of ISO 8859-1, changing the character set will generally require rebuilding the database.
Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC

Similar Messages

  • Cannot Store Chinese Characters In Oracle 9.2.0.7 Database

    Hi,
    I'm having trouble localizing my Oracle 9.2.0.7 / ASP web application for our Chinese-speaking users.
    My Oracle 9.2.0.7 Database has NLS_NCHAR_CHARACTERSET set to AL16UTF16.
    I've set up a test table thus:
    CREATE TABLE "TBL_TEST_CH"
    field1                          NVARCHAR2(40),
    field2                          NVARCHAR2(40)
    I have the Chinese character set installed on my database / web server (same box), as well as a test client machine. I can see Chinese characters in my web browser, and can enter them in a test ASP page I've set up. When I execute an insert statement via ADO, the insert statement seems to work, but the result is that the data seems to be stored as upside-down question marks.
    I thought perhaps the data was being somehow scrambled between the web app and the database, so I set up an external table import the Chinese data from a Unicode text file:
    CREATE TABLE kenny.ch_import
         FIELD1          NVARCHAR2(255),
         FIELD2          NVARCHAR2(255)
         ORGANIZATION EXTERNAL (TYPE oracle_loader
         DEFAULT DIRECTORY ext_dat_dir
         ACCESS PARAMETERS
         (RECORDS DELIMITED BY ":"
         FIELDS TERMINATED BY "~"
         missing field values are null)
         LOCATION (ext_dat_dir:'test_ch.txt'))
         reject limit unlimited
    However, when I query the data in the external table using my web application, it comes back with garbage like "ÿþ1" and the like.
    To attempt to determine if the database is capable of storing the Chinese characters, I've performed the following test:
    1) I insert a Chinese character in an NVARCHAR2 field in my table by using the UNISTR function thus:
    insert into tbl_test_ch (field1) values (unistr('\3E00'))
    2) I interrogated the value using the dump function thus:
    select dump(field1, 1016) FROM tbl_test_ch
    I'm struggling to understand the output. Obviously the character set being used is "AL16UTF16" (which I would expect to be able to store Chinese characters), but the return_format argument I've provided to the function (1016) should return the hexadecimal code point of the character that's being stored. I would expect this to be the same as I inserted ("3E00"), but I'm getting the following output:
    DUMP(FIELD1,1016)
    Typ=1 Len=2 CharacterSet=AL16UTF16: 3e,0
    I'd really appreciate any suggestions on what I could do next to determine exactly where the problem lies. I've not been able to convince myself that the database is correctly storing the Chinese character data, but I appreciate equally that the problem could lie elsewhere.
    Thanks in advance,
    Kenny McEwan.

    Thanks, Serguisz.
    My technology stack is as follows:
    ASP 3.0 web application, running on IIS6.
    On the web servier, I have MDAC 2.8 SP2 on Windows Server 2003 SP1.
    On the Oracle database server, I have Windows Server 2003 SP1.
    My Oracle database version is 9.2.0.7.
    The client I've been using in this investigation is Internet Explorer 6.0.2900.
    It does look like you're right about characters coming from the application are being corrupted. To support this, I tried to insert the chinese character 博 as well as the Unihan character 中 from a web page in my application. I then used the dump function to interrogate the contents of the field I input to thus:
    select dump(field1, 1016) FROM tbl_test_ch
    DUMP(FIELD1,1016)
    Typ=1 Len=2 CharacterSet=AL16UTF16: 0,bf
    Typ=1 Len=2 CharacterSet=AL16UTF16: 0,bf
    Both characters seem to have suffered the same corruption.
    The problem seems to happen in the other direction as well - even after verifying that the character detailed in the previous post was stored correctly, it is still displayed by my web app as an upside down question mark.
    Do you have any suggestions on how to proceed?
    Best regards,
    Kenny.

  • How to display Chinese characters in Oracle?

    I am using Oracle 8i with Language settings as AMERICA.
    I am displaying records which is contain Chinese characters.
    But it is not displayed properly in Oralce.
    How to change the settings to display Chinese characters?
    Thanks

    It could be possible to display Chinese characters using SQL Developer without any specific NLS_LANG setting because SQL Developer is using JDBC which doesn't use NLS_LANG setting according to When is NLS_LANG used ?.
    For example, I'm able to display the following Chinese character in SQL Developer 1.2.0 on Windows XP Pro with French Windows setting and NLS_LANG set in Windows registry to FRENCH_FRANCE.WE8ISO8859P1.
    select unistr('\8349') from dual;

    [pre]
    Message was edited by:
            Pierre  Forstmann                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How is WE8MSWIN1252 characterset storing chinese characters???

    I've read several oracle globalization documents and I'm very confused now. Here's my setup:.. everything is on 1 machine
    I'm runnig oracle 9.2.0.4 database on windowsXP.
    HKLM\SOFTWARE\ORACLE\NLS_LANG registry key value = NA
    HKLM\SOFTWARE\ORACLE\HOME0 registry key value = AMERICAN_AMERICA.WE8MSWIN1252
    select * from nls_database_parameters
    returns:
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_LANGUAGE =     AMERICAN
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    windows xp settings for regional & language options, advanced tab under language for non-unicode programs is set to Chinese(Taiwan).
    Using the strgen tool available for free from MS here (http://www.microsoft.com/globaldev/tools/strgen.mspx). I generate hundreds of CHT(Chinese Taiwan) characters and then insert them via sqlplus into a varchar2(100), then query the results getting what looks like the exact characters I put in.
    If I run:
    select dump(column_name), column_name from table_name;
    on a row containing 4 chinese characters the results are:
    Typ=1 Len=8: 165,250,184,234,187,219,179,225 [4 chinese characters go here - sorry they aren't pasting properly]
    Looks like multibyte to me, but I must be missing something??
    My main question is why DON'T I get question marks??? I.e. Since I'm using an single byte characterset shouldn't it be junk that is return instead of exactly, or at least what looks like exactly, the same characters be returned. I'm missing something -- please, someone clear things up for me. I will provide whatever info that is necessary.
    This is very critical to us in that we've been using a front-end application for some time with this configuration and have only recently tried globalizing/localizing our web based products. It seems that in order for apache to send the proper encoding to the web based client, that the nls_lang registry entry should be set to ZHT16BIG5, which will make the browser work, but this then breaks our front-end app.
    Thank you,
    Jason

    This is typical pass-through scenario (known as "garbage-in garbage-out").
    You have defined NLS_LANG to be the same as the database character set.
    Therefore, the database does no character set conversion as it thinks
    no conversion is needed. You see Chinese characters because the SQL*Plus
    font is set to the system default for Chinese locale. The operating system
    displays received codes as Chinese and not as Western European.
    For the data that you DUMPed, call LENGTH(). In a correct configuration,
    with the ZHT16MSWIN950 character set, the function would return 4.
    But it will return 8, because Oracle thinks the input is a string of WE8MSWIN1252
    single-bytes codes. Also, try Java to show the characters. You will
    not succeed, because Java converts to Unicode and this conversion from
    WE8MSWIN1252 will produce mess from the Chinese codes.
    In a proper configuration, you need NLS_LANG=.ZHT16MSWIN950 and
    the database character set (NLS_CHARACTERSET) either ZHT16MSWIN950,
    or AL32UTF8, if the database is to be really multilingual.
    -- Sergiusz

  • Storing Chinese Characters

    What are the NLS_CHARACTERSET and NLS_LENGTH_SEMANTICS settings required to store chinese characters?

    AL32UTF8 and AL16UTF16 support exactly the same Unicode standard in a given Oracle version. Both support supplementary characters: AL32UTF8 as single 4-byte codes, AL16UTF16 as surrogate pairs (two codes 2 bytes each). Therefore, AL32UTF8 support for supplementary characters is actually more transparent.
    Also, AL32UTF8 is only valid as the database character set (VARCHAR2, CHAR, LONG, CLOB), while AL16UTF16 is only valid as the national character set (NVACHAR2, NCHAR, NCLOB).
    UTF8 is the character set that should be avoided as it supports Unicode 3.0 only.
    -- Sergiusz

  • How to get utf-8 Chinese Characters from Oracle DB by EJB

    We have found that after disabling JIT in weblogic, the Chinese can be displayed correctly, otherwise, it doesn't work.How come this happens?

    Thanks for all of your suggestions. It still refuses to work.
    I entered the following: ���^�E on the HTML form using the Chinese(PRC)keyboard on my Win2K box.
    I checked and verified the correct encoding in the servlet request (GB2312 for chinese characters)
    request.getParameter(xxx) yields ???
    new String(request.getParameter(xxx).getBytes("GB2312")) yields three boxes (values 20309, 27946 and 23380)
    new String(request.getParameter(xxx).getBytes("GB2312"), "UTF-8") yields nothing
    Any ideas?

  • Display chinese characters from oracle 8i database using UTF-8

    I have written a program to retrieve chinese characters from the database and display in the web page.If I change the encoding of the webpage manully it displays the chinese characters(比分卡片 ).Or it shows the junk characters(�������� ).Can anybody help so that do I have to do any encoding or any other settings?.I am using Jdeveloper.
    Rgds
    Ganesh
    <HTML><HEAD><TITLE>Welcome to METRO</TITLE>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
    <%//@ page contentType="text/html; charset=UTF-8" %>
    <%@ page import="java.io.*,java.io.InputStream,java.nio.*,java.lang.*,java.util.*,javax.naming.Context,java.sql.Connection,javax.sql.DataSource,javax.naming.InitialContext,java.sql.*" %>
    </HEAD>
    <BODY >
    <%
    String value="";
    try{
    Connection dbConn;
    Statement stmt=null;
    Context jndiCtx=new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)jndiCtx.lookup( "jdbc/webdbPooledDS" );
    dbConn= ds.getConnection();
    stmt=dbConn.createStatement();
    String sql="select prog_name_LL2 from wb_prog_new_metro where table_name='SCORE_CARD'";
    ResultSet rs = stmt.executeQuery(sql);
    if( rs.next()){                    
    value=rs.getString(1);
    out.println(value);
    }catch(Exception e){
    System.out.println("Exception ="+e.getMessage());
    %>
    </BODY></HTML>

    Make sure that you have a Unicode font that supports Chinese characters. I have been testing the support of Unicode text (allows many other character and image based languages to be displayed) and have found that it depends on what fonts are available on the system you're viewing the report on. Unicode is supported in Crystal (since version 9 I believe) but it will display '?' or '[]' if there isn't a font to render the text properly.
    This font supports loads of languages: http://www.code2000.net/code2000_page.htm

  • Storing Foreign Characters in oracle 9i Lite Client Database.

    Hi All,
    My Database configuration Is
    RDBMS VERSION 9.0.1.1.1
    NLS_CHARACTERSET AL32UTF8
    NLS_NCHAR_CHARACTERSET AL16UTF16
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    Operating System Windows 2000
    My Oracle Lite configuration Is
    Oracle9i Lite Release 5.0.2.0.8
    Client Locations:
    Africa,Europe,Asia,America
    Currently all clients store data only in English in the client odb either through java and oracle forms applications.
    We want to now store data for some specific tables, in the clients own language.Also we should be able to retrieve that data and see that data as it was entered.
    For example :
    The client in china after downloading the odb should be able to enter the data for that specific tables in the Chinese language.(They use windows 2000/XP English version).
    1. What are the settings i need to do in the client environment?
    like installing Chinese font or setting NLS_LANG parameter etc...
    2. What are the settings i need to do in the server environment?
    Because there should not be any loss of any data or junk values getting stored instead of actual values entered by clients.
    Also when i query that specific tables in the oracle database after synchronization i should be able to view that data entered by the clients in their own language.
    Eg:data entered by china clients should be visible in chinese fonts,
    data entered by brazil clients should be visible in brazilian fonts,
    data entered by vietnam clients should be visible in vietnamese fonts.
    3. will there be any synchronization issues when clients try to sync after data entry with
    their own languages?
    Please do advice on these issue...........

    I have given you the info of how to set up Oracle Lite for UTF8. I can only point you in the direction for globalization on the enterprise server. Also note that Oracle Lite only support NLS_LENGHT_SEMANTICS=BYTE, your EE database will be CHAR, so you have to alter the session paramter before you create the repository and/or publish your application.
    Here is a Oracle Document on Globalization:
    http://www.oracle.com/technology/tech/globalization/pdf/TWP_AppDev_Unicode_10gR2.pdf
    Here is what Oracle Lite's Developers Guide has on development of linguistic sorts:
    2.11 Support for Linguistic Sort
    Linguistic sort is a feature for the ASCII version of Oracle Database Lite. It produces culturally acceptable order of strings for a specified language or collation sequence. The ASCII version supports several code pages defined by single-byte 8-bit encoding schemes. Each of these code pages is a super set of 7-bit ASCII, and the additional accented characters necessary to support a group of European languages are included in the upper 128 bytes. A new string comparison mechanism is provided that produces strings in a linguistically correct order by mapping each collation element of a string to the corresponding 8-bit value of the supported code page.
    2.11.1 Creating Linguistic Sort Enabled Databases
    The linguistic sort capability must be enabled when the database is created using the CREATEDB command line utility with the <collation_sequence> enabled.
    Note:
    For more information on the CREATEDB utility, see Section A.2, "CREATEDB".
    The behavior of the ORDER_BY clause and the WHERE condition are determined by how the NLS_SORT parameter is implemented. Binary sorting is the default setting, and is used unless the <collation_sequence> parameter is set to use the linguistic sort ordering rules.
    NLSRT is not supported in the current version of Oracle Database Lite. Therefore, NCHAR data type is not yet available.
    2.11.2 How Collation Works
    Collation refers to ordering of strings into a culturally acceptable sequence. A collation sequence is a sequence of all collation elements from an alphabet from smallest collation order to the largest. Once a collation sequence is given, orders of all strings from the same alphabet are fixed. As such, the collation sequence encodes the linguistic requirements on collation. A collation element is the smallest sub-string that can be used by the comparison function to determine the order of two strings.
    2.11.3 Collation Element Examples
    Normally, a collation element is just one character. In binary sorting, only one property, the code value that represents a character, is used. But in linguistic sorting, usually three properties. The primary level of difference is the base character. The secondary level of difference is for diacritical marks on a given base character. The tertiary level of difference is for the case of a given character. Punctuation can function as a fourth level of difference, but comparisons for punctuation occur last and are made at the binary rather than the linguistic level. These are used for each collation element. The following sections contain examples that demonstrate sorting priorities.
    2.11.3.1 Sorting Normal Characters
    This section lists a set of examples that describe how to sort normal characters.
    Example 1
    'a' < 'b'. There is a primary difference between them on the character level.
    Example 2
    'À' > 'a'. This difference occurs on the secondary level. Note that 'À'and 'a' are considered "equal" on the primary level.
    Example 3
    'À' < 'à' in FRENCH but 'À' > 'à' in GERMAN. This difference on the tertiary level. Note that 'À' and 'à' are considered being "equal" on the primary and secondary level. Also note that the case convention may be different for different language.
    Example 4
    'às' < 'at'. This is a difference on the primary level. This example shows the role of difference levels: the lower level differences are ignored if there is a primary level difference anywhere in the strings.
    Example 5
    '+data' < '-data' <'data' <'data-'. If strings are compared and present no difference on the primary, secondary, or tertiary levels, they are compared for punctuation.
    2.11.3.2 Reverse Sorting of French Accents
    Some languages, particularly French, require words to be ordered on the secondary level according to the last accent difference. This behavior is known as French secondary sorting or French accent ordering.
    Example
    'côte' < 'coté' in FRENCH but 'coté' < 'côte' in GERMAN. Note that the secondary difference of 'e' and 'é' occurred later than those of 'ô' and 'o'.
    2.11.3.3 Sorting Contracting Characters
    There are some special cases where two or more characters in a group can function as a single collation element. These types of collation elements are called 'contracting characters' or 'group characters'. In these cases each of these characters properties are assigned appropriate values.
    Example
    'h' < 'ch' < 'i' in XCZECH. Here 'ch' is assigned a primary property value which differentiates it from 'h' and 'i', such that 'h' < 'ch' < 'i'. Note that 'ch' is treated as a single character.
    2.11.3.4 Sorting Expanding Characters
    If a letter sorts as if it were a sequence of more than one letter, it is called an 'expanding character'. For example, in German the sharp s (ß) is treated as if it were a string of two characters 'ss' when comparing with other letters.
    2.11.3.5 Sorting Numeric Characters
    Only sorting of single digit characters from '0' to '9' is currently supported. For the supported European languages a digit character is always sorted as greater than any alphabetic character. For other languages this may be not the same. Other numeric characters such as Roman numeric characters and counting sequences, such as "one", "two", "three", are not supported at this time.
    Example
    '1' > 'z' in any European language, '1' < 'a' in LATVIAN. Note that this difference occurs on the primary level.

  • Problem storing Russian Characters in Oracle 10g

    We are facing an issue in one of our sites which is in Russian Language. Whenever data is submitted with Russian Characters it saves it as Question mark(upside down) in the database. Database is not supporting these characters.The character encoding is done in UTF-8 format from the front end.
    This code use to work fine with Oracle 9i database but after the upgradation to Oracle 10g this problem has started occuring. We have not made any changes to the code after the upgradation of the database.
    How can we resolve this and what are the settings that we can do to make this work fine?

    What is your database character set and national character set?
    SELECT *
      FROM v$nls_parameters
    WHERE parameter like '%CHARACTERSET';Are you storing the data in CHAR/ VARCHAR2/ CLOB columns? Or NCHAR/ NVARCHAR2/ NCLOB?
    Justin

  • Problem inputting Chinese characters in oracle forms

    Hi,
    We have a Chinese character: UCS2=7A4F (UTF8=E7A98F) If we try to input it to a control in a Forms application using chanjie (key sequence h-d-b-s-p) input method, it becomes "?", but if we input it using same method in word or notepad, it shows correctly and can then be copy-and-paste to oracle forms.
    Is there some sort of implicit conversion of Chinese character input done by Oracle Forms controls such that it is unable to decode this character properly? Or is there some sort of setup that can be done to bypass this problem?
    Any help would be greatly appreciated, hopefully as soon as possible.
    Thank you very much.

    979801 wrote:
    If I use LOV in place of List Item,Then I have to populate a LOV at run time.How could I maintain a record group n attach to LOV at run time?
    On my previous post I have mentioned record group as follows:
    select * from tbl_state where s_id=:tbl_address.s_id;
    If :tbl_adress.s_id chaned during the time of run, then output values of list_city (LOV) is also changed.

  • Problem in storing korean Characters in Oracle 10g

    Hi All,
    Below are the current setup.
    OS : Windows
    Oracle Version : 10G
    Database Character Set : AL32UTF8
    NLS_LANG = KOREAN_KOREA.KO16MSWIN949 (in windows)
    I can able to see Korean characters in MS Word & MS Excel. I copied some of the korean characters
    and pasted in notepad and saved the file in UTF format. I tried to insert that data using sql loader.
    After inserting the data, I could find only unknown characters with lots of ??? symbol. I have also
    changed the data fonts to korean language in TOAD. But I can find only non-korean characters in
    the table.
    Please advise me, whether any other settings to be changed or provide step-by-step procedure to store
    the korean data in database.
    Regards,
    Ramesh

    Unable to insert Korean Language in Oracle 10g

  • What file format Oracle Database 11g can spool data w chinese characters?

    Hi,
    I have a batch job that spools data into a text file for further processing but now I have data that contains chinese characters.
    From what I know text file (.txt) cannot support chinese characters.
    Anyone has any idea what file format Oracle Database 11g can spool data with chinese characters?
    Thank you!
    Regards,
    Fel

    I'm not sure this can work with SQL*Plus in character mode on Windows DOS mode. But this should work with SQL Developer: see Re: How to display Chinese characters in Oracle?
    I can also make this work with Linux:
    $ locale
    LANG=fr_FR.UTF-8
    LC_CTYPE="fr_FR.UTF-8"
    LC_NUMERIC="fr_FR.UTF-8"
    LC_TIME="fr_FR.UTF-8"
    LC_COLLATE="fr_FR.UTF-8"
    LC_MONETARY="fr_FR.UTF-8"
    LC_MESSAGES="fr_FR.UTF-8"
    LC_PAPER="fr_FR.UTF-8"
    LC_NAME="fr_FR.UTF-8"
    LC_ADDRESS="fr_FR.UTF-8"
    LC_TELEPHONE="fr_FR.UTF-8"
    LC_MEASUREMENT="fr_FR.UTF-8"
    LC_IDENTIFICATION="fr_FR.UTF-8"
    LC_ALL=
    $ cat chinese.sql
    cat tchinese.sql
    set echo on
    spool tchinese.log
    select * from v$version;
    select unistr('\8349') from dual;
    exit
    $ cat tchinese.log
    SQL> select * from v$version;
    BANNER                                                                         
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Prod               
    PL/SQL Release 10.2.0.1.0 - Production                                         
    CORE     10.2.0.1.0     Production                                                     
    TNS for Linux: Version 10.2.0.1.0 - Production                                 
    NLSRTL Version 10.2.0.1.0 - Production                                         
    SQL> select unistr('\8349') from dual;
    UNIS                                                                           
    草                                                                              Edited by: P. Forstmann on May 27, 2009 10:30 AM
    Edited by: P. Forstmann on May 27, 2009 10:33 AM

  • How to store and retrieve chinese characters

    Hi, I am facing some problem in storing and retrieving of chinese characters from oracle,9i .
    This is the character i am trying to store into the database
    自动提款机网络
    while trying to retrieve it, it shows
    自?提款机网?
    ^ ^
    you can see the weird characters like ? at some places.
    here is the sample code which i can using to store and retrieve data from the database
    class testInsert
    public static void main(String[] args)
    try {
         DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
         Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@172.16.6.81:1521:JFPPTDB1", "citi_user", "citi_user");
         int employee_id = 12345;
    String ename = "自动提款机网络";
         oracle.jdbc.OraclePreparedStatement pstmt = (oracle.jdbc.OraclePreparedStatement)conn.prepareStatement("INSERT INTO employees (employee_id, last_name) VALUES (?, ?)");
         pstmt.setFormOfUse(2, oracle.jdbc.OraclePreparedStatement.FORM_NCHAR);
         pstmt.setInt(1, employee_id);
         pstmt.setString(2, ename);
         pstmt.execute();
    pstmt.close();
    pstmt = (oracle.jdbc.OraclePreparedStatement)conn.prepareStatement("SELECT last_name, employee_id from employees");
    ResultSet rset = pstmt.executeQuery();
              String name = "";
              while(rset.next())
                   name = rset.getString(1);
         int id = rset.getInt(2);
              System.out.println("the name is :"+name);
    catch (SQLException sqe)
              System.out.println("Java SQLException caught, error message="+sqe.getMessage());
    and the table in oracle is
    SQL> desc employees;
    Name Null? Type
    LAST_NAME NVARCHAR2(10)
    EMPLOYEE_ID NUMBER
    I am using classes12.zip for oracle,9i. Is there any database setting that i need to know to retrieve the chinese characters?.
    I have been facing this problem for quite sometime and it makes my life tough. Please help me in solving this issue.
    Thanks
    PD

    hi, can you retrieve the chinese character from your os? When it comes to the wild code of asian character, you should focus on the database/client character setting. you may ask more about it from your dba.
    have a nice weekend!
    eilison
    [email protected]

  • Problems in displaying chinese characters with utf-8 encoding

    Hi,
    I got problem in displaying chinese characters in my web application.
    I am creating a web application supporting both English and Chinese charaters. What I am trying to do is:
    1. storing some chinese characters via a web page (page1) into database.
    2. retrieve the chinese characters via another web page (page2) from the database.
    Once I put the Chinese characters on the webpage (page1 in step #1), it displayes well (the readable chinese characters) before I submit this page (after submit, the data will be stored into the database).
    But when I tried to display the chiese characters via page2 in step#2, I got un-readable characters displayed.
    The running configuration is: Sun Application Server (coming and with the JSC2) and MySQL server 5.0. And I setup the database server with utf8 as character-set.
    It seems like the chinese characters got messed up throught the round-trip (from page1<----via jdbc---->database<----via jdbc------>page2).
    From the database, I found the chinese characters are there. Any helps are appreciated.

    Hi,
    I am trying to insert new record.The record may contain chineese or English data.
    I did same what u specified.
    first I converted to the byte UTF8.again,I converted byte to string using 8859_1.
    the values are not storing chinese characters.
    pls suggest me.
    below is my code.
                                  ascCode = req.getParameter("asccode");
                                  countryCode = req.getParameter("countrycode");
                                  ascName      = req.getParameter("ascname");
                                  address1     = req.getParameter("ascaddress1");
                                  address2 = req.getParameter("ascaddress2");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
                                  ascC = ascCode.getBytes("UTF8");
                                  coun = countryCode.getBytes("UTF8");
                                  ascN           = ascName.getBytes("UTF8");
                                  add1 = address1.getBytes("UTF8");
                                  add2          = address2.getBytes("UTF8");
                                  System.out.println("ASC NAME:"+ascN);
                                  System.out.println("ADDRESS1:"+add1);
                                  System.out.println("ADDRESS2:"+add2);
                                  ascCode = new String(ascC,"8859_1");
                                  countryCode= new String(coun,"8859_1");
                                  ascName = new String(ascN,"8859_1");
                                  address1 = new String(add1,"8859_1");
                                  address2 = new String(add2,"8859_1");
                                  System.out.println("ASC NAME:"+ascName);
                                  System.out.println("ADDRESS1:"+address1);
                                  System.out.println("ADDRESS2:"+address2);
    thanks.

  • Displaying Chinese Character in Oracle Form 6i using Oracle 11g Database

    Hi,
    Please, can anyone send me the solution for displaying the Chinese characters in Oracle Form 6i using Oracle 11g database and also
    the configuration that has to be implemented.Its urgent.
    Thank You,
    Sridhar.T

    displaying the Chinese characters in Oracle Form 6i using Oracle 11g database I'm afraid you might have problems... see Implementing Chinese language in Oracle 11g

Maybe you are looking for

  • After upgrading to Mavericks, macbook pro very slow

    Hiya I upgraded to Mavericks and ever since then my macbook pro is very slow. When I try to open a new finder window, I get the rainbow ball. Chrome is extremely slow. Word is also slow to open, slow to wake, and slow to shut down. Pretty much everyt

  • How can I see the photo quality settings in iLife'06 books

    I assembled a 100 page book using iLife'05 over the last week or so. Luckily I hadn't ordered the book before learning about the new "improved print quality" when using iLife'06. Well, iLife'06 finally arrived today and I installed it and... Well, do

  • How do i get my files from windows laptop to my new iMac?

    how do i get my files from laptop to my new imac?

  • Inserting Information in PostgreSQL interval

    Hey, I am having trouble entering intervals into a PostgreSQL inverval field. Currently I using prepared statements that look like this: PreparedStatement query = conn.prepareStatement("INSERT............"); query.setObject(1, "{28.1, 29.2}"); query.

  • File-XI-File

    One more on File-XI-File scenario... Unable to pick the sender file test.dat located on /oracle/XI3 folder. Sender comm channel created as: NFS. Source Dir: /oracle/XI3 File: test.dat Poll int: 5 secs Proc mode: Delete File type: Text I already have