Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

UNICODE

Posted on 2003-10-28
5
Medium Priority
?
2,323 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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

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…
I remember the day when someone asked me to create a user for an application developement. The user should be able to create views and materialized views and, so, I used the following syntax: (CODE) This way, I guessed, I would ensure that use…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

636 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