Solved

UNICODE

Posted on 2003-10-28
5
2,295 Views
Last Modified: 2007-12-19
Hi,

Will Oracle does encoding conversion on server side ??
If it by default converts all strings to Unicode,
Which foramt it will use?? single-byte or two-byte format?

Thanks in advance
Srinib
0
Comment
Question by:srinib
  • 3
  • 2
5 Comments
 
LVL 1

Author Comment

by:srinib
ID: 9639086
I need to store my data in UNICODE two-byte format.
Will ORACLE do it by default??
If not, What should i do??
0
 
LVL 47

Expert Comment

by:schwertner
ID: 9640349
By creating the Database you should choose the Character Set. The best choice is ALU32UTF8, but it can be used only in pure 9i Environment (not with 8i clients). The strings will be converted to the DB character set automatically.


AL16UTF16 is fixed-width 2 bytes per character. It is supported for NCHAR, NVARCHAR2 and NCLOB only (national character set). It is not a binary superset of any other Oracle character set. AL16UTF16 corresponds to Unicode UTF-16 encoding.

AL32UTF8 is a varying width 1-4 bytes per character. It is supported for CHAR, VARCHAR2, LONG and CLOB only (database character set). It is a binary superset of UTF8 (in 9.2 only) and US7ASCII. AL32UTF8 corresponds to Unicode UTF-8 encoding.

UTF8 is a varying width 1-3 bytes per character Unicode encoding. It is supported for both database and national character sets. It is a binary superset of US7ASCII. UTF8 corresponds to Unicode CESU-8 encoding.

The difference between UTF8 and AL32UTF8 are:
- UTF8 stores Unicode characters with code points > U+FFFF as two surrogate characters, three bytes each
- AL32UTF8 stores Unicode characters with code points > U+FFFF as one four-byte character
- UTF8 will not be updated anymore when new Unicode versions are released, only AL32UTF8 and AL16UTF16 will.

Due to compatibility problems with pre-9i versions use UTF8 if you have Oracle8(i) clients connecting to the database. Use AL32UTF8 in pure Oracle9i environment.
0
 
LVL 1

Author Comment

by:srinib
ID: 9640639
Already the database is cretaed. I am using Oracle8i client..
If i change the charcter set of the database to AL16UTF16, will it change it two-byte format(i mean all the strings)?

In this case, i hope that i need not alter my tables from char to nchar etc.. to store in two byte format .

Thanks
Srinivas

0
 
LVL 47

Accepted Solution

by:
schwertner earned 50 total points
ID: 9641141
If the DB is empty it will be created in that char. set. If it is old DB you should export the whole DB, create a new one wit that char.set and import the whole DB.
0
 
LVL 1

Author Comment

by:srinib
ID: 9647593
Thanks schwertner..

Srinib
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now