?
Solved

UNICODE

Posted on 2003-10-28
5
Medium Priority
?
2,322 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 48

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 48

Accepted Solution

by:
schwertner earned 200 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

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
Shell script to create broker configuration file using current broker Configuration, solely for purpose of backup on Linux. Script may need to be modified depending on OS-installation. Please deploy and verify the script in a test environment.
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

765 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