#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2010
    Posts
    1
    Rep Power
    0

    Oracle 10g - Chinese Charecter issue


    Hi All



    I have the following scenario and I need your valuable inputs solve my problem



    I am using Oracle 10g version and I have a database created and it contains around 9 tables and 25k records, as per my current requirement I need to add few more columns in the existing tables and those new columns are going to be filled with contents from multiple languages (as of now Chinese and English). I went through Oracle 10g globalization guide and I understood that, for my requirements I need to add my new columns with data types of either NVARCHAR or NCHAR.



    With my about understanding I created the following table and tried to insert some Chinese characters as follows but its now coming as expected and Im getting inserted only ???? in my table columns



    Please find below the list of my actions

    -----------------------------------------------------------

    >create table Employee(EmpId varchar(255), EmpName NCHAR(255));

    >insert into Employee(EmpId, EmpName) values('280129','彭俊睦');

    >select * from Employee;

    280129

    >insert into Employee(EmpId, EmpName) values('28018',N'彭俊睦');

    >select * from Employee;

    280129

    28018



    When I run the select * from v$nls_parameters; query Im getting the following data



    NLS_LANGUAGE --------- SIMPLIFIED CHINESE

    NLS_TERRITORY--------- AMERICA

    NLS_CURRENCY--------- $

    NLS_ISO_CURRENCY--------- AMERICA

    NLS_NUMERIC_CHARACTERS--------- .,

    NLS_CALENDAR--------- GREGORIAN

    NLS_DATE_FORMAT--------- DD-MON-RR

    NLS_DATE_LANGUAGE--------- SIMPLIFIED CHINESE

    NLS_CHARACTERSET--------- WE8ISO8859P1

    NLS_SORT--------- BINARY

    NLS_TIME_FORMAT--------- HH.MI.SSXFF AM

    NLS_TIMESTAMP_FORMAT--------- DD-MON-RR HH.MI.SSXFF AM

    NLS_TIME_TZ_FORMAT--------- HH.MI.SSXFF AM TZR

    NLS_TIMESTAMP_TZ_FORMAT --------- DD-MON-RR HH.MI.SSXFF AM TZR

    NLS_DUAL_CURRENCY--------- $

    NLS_NCHAR_CHARACTERSET--------- AL16UTF16

    NLS_COMP--------- BINARY

    NLS_LENGTH_SEMANTICS--------- BYTE

    NLS_NCHAR_CONV_EXCP--------- FALSE



    Please let me know what Im doing wrong, and help me to solve this problem.



    Waiting for your update



    Thanks



    With Regards

    Venkatesh
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2010
    Location
    Vienna, Austria
    Posts
    58
    Rep Power
    5
    Hi,

    your problem seems to be the NLS_CHARSET which - according to your posting - is WE8ISO8859P1, a western European (8 bit) character set.

    I'm not really an expert on multi byte charsets, but I'm afraid, Simplified Chinese is a 16 bit charset (so you have to use a 16bit set like AL32UTF8).

    Hopefully I'm wrong, becuse this would mean, that you have to recreate your database.

    The Oracle Globalization Support Guide might be helpful:

    http://download.oracle.com/docs/cd/E...e10729/toc.htm
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2009
    Posts
    5
    Rep Power
    0
    NLS_CHARACTERSET--------- WE8ISO8859P1
    ---------------------
    That's the problem,change it to
    NLS_CHARACTERSET--------- ZHS16GBK,then ok.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2004
    Posts
    378
    Rep Power
    11
    Hi,

    Had a little experience with this:

    1. Make sure the database is in UTF8 (AL32UTF8) and not a local characterset such as (WE8MIS...) (e.g.Latin1/Latin2, etc).
    2. Alter the NLS_LANG environmental variable to the correct characters set (see http://www.oracle.com/technology/tech/globalization/htdocs/nls_lang%20faq.htm) - one specific to the Chinese characters you wish to upload (Simplified Chinese is one I've used before)
    3. I presume notepad or any other text editor can display your chinese characters?

    Ben

IMN logo majestic logo threadwatch logo seochat tools logo