2 Replies Latest reply: Sep 7, 2009 8:35 AM by sunir RSS

    New 11g database Character set queries

    sunir
      Hi

      I am creating a new (spatial) database in 11.1.0.7 version.

      Default character set values I get are:

      CHARACTER SET = WE8MSWIN1252
      NATIONAL CHARACTER SET = AL16UTF16

      This a single language database but we need to use unicode for XML stuff.

      1 - What is the difference between al32utf8 and al16utf16?
      2 - If I set the above values to
      CHARACTER SET = AL32UTF8
      NATIONAL CHARACTER SET = AL16UTF16
      is there likely to be a problem?

      This database will have db links to older 9i versions of oracle.

      any help is appreciated.
        • 1. Re: New 11g database Character set queries
          Sergiusz Wolicki-Oracle
          AL32UTF8 is Oracle's name for Unicode UTF-8 encoding. This character set is valid as the database character set, that is, for CHAR, VARCHAR2, LONG and CLOB data.

          AL16UTF16 is Oracle's name for Unicode UTF-16BE encoding. This character set is valid as the national database character set, that is, for NCHAR, NVARCHAR2, and NCLOB data.

          ## If I set the above values to
          ## CHARACTER SET = AL32UTF8
          ## NATIONAL CHARACTER SET = AL16UTF16
          ## is there likely to be a problem?

          This is a very general question. AL32UTF8 is strongly recommended by Oracle for any database that is to be used (now or in future) for global data, e.g. for Internet applications or in multinational companies. With economy becoming more and more global, and Unicode being Internet's character set of choice, AL32UTF8 is generally recommended for all databases.

          The use of the national character set data types, and thus AL16UTF16, is generally not recommended because of implementation limitations.

          Some caveats: AL32UTF8 is a variable-width multibyte character set. It encodes many characters, even European, in more than one byte. Applications that were written with single-byte character sets in mind need to be reviewed and possibly corrected to work properly with AL32UTF8. Also, AL32UTF8 requires more CPU cycles to process a string. If your database does a lot of string processing and the server runs at its capacity, you may run into performance problems. But do not let performance considerations decide about the use of AL32UTF8. It is better to spend some money now for some extra hardware than much more money later for a project to migrate an already large database from WE8MSWIN1252 to AL32UTF8, when Unicode becomes a requirement.


          -- Sergiusz
          • 2. Re: New 11g database Character set queries
            sunir
            thanks for the info