3 Replies Latest reply: Jan 3, 2013 8:59 AM by liaison1 RSS

    What character set to setup for supporting Chinese Characters?

    liaison1
      We have a database that need to handle Chinese characters. Currently, it is setup like this:

      SQL> select * from NLS_DATABASE_PARAMETERS;

      PARAMETER VALUE
      ------------------------------ ----------------------------------------
      NLS_LANGUAGE AMERICAN
      NLS_TERRITORY AMERICA
      NLS_CURRENCY $
      NLS_ISO_CURRENCY AMERICA
      NLS_NUMERIC_CHARACTERS .,
      NLS_CHARACTERSET WE8MSWIN1252
      NLS_CALENDAR GREGORIAN
      NLS_DATE_FORMAT DD-MON-RR
      NLS_DATE_LANGUAGE AMERICAN
      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_COMP BINARY
      NLS_LENGTH_SEMANTICS BYTE
      NLS_NCHAR_CONV_EXCP FALSE
      NLS_NCHAR_CHARACTERSET AL16UTF16
      NLS_RDBMS_VERSION 11.2.0.1.0


      What character should I change to be able to handle Chinese character and how to do it? Thanks!
        • 1. Re: What character set to setup for supporting Chinese Characters?
          rp0428
          You need to create the database with the characterset you want to use. You cannot convert it after it is created.

          You could use AL32UTF8 for the characterset to handle chinese characters.

          See the Length Semantics section of the globalization guide for an explanation of how the characterset affects the size of columns that you specify.
          http://docs.oracle.com/cd/B28359_01/server.111/b28298/ch2charset.htm
          >
          Character semantics is useful for defining the storage requirements for multibyte strings of varying widths. For example, in a Unicode database (AL32UTF8), suppose that you need to define a VARCHAR2 column that can store up to five Chinese characters together with five English characters. Using byte semantics, this column requires 15 bytes for the Chinese characters, which are three bytes long, and 5 bytes for the English characters, which are one byte long, for a total of 20 bytes. Using character semantics, the column requires 10 characters.
          • 2. Re: What character set to setup for supporting Chinese Characters?
            Srini Chavali-Oracle
            Pl post details of OS and database versions.

            If the database is empty (or has data that is of no consequence), create a new database with with AL32UTF8 characterset.

            http://docs.oracle.com/cd/E11882_01/server.112/e25494/create001.htm#ADMIN13343

            If the database has data that you cannot lose, you will need to follow the steps in the docs

            http://docs.oracle.com/cd/E11882_01/server.112/e10729/ch11charsetmig.htm

            DMU is another tool that can be used

            http://www.oracle.com/technetwork/products/globalization/dmu/overview/index.html

            Changing the characterset of an existing database is not a trivial exercise and should be done with care and the application tested thoroughly.

            Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode) [ID 260192.1]

            HTH
            Srini
            • 3. Re: What character set to setup for supporting Chinese Characters?
              liaison1
              Thank you all for the information! I will contact the application team to see if we need to convert the existing database or create a new one.