Solved

UNICODE

Posted on 2003-10-28
5
2,318 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
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…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

696 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