Solved

oracle unicode

Posted on 2007-03-27
13
1,101 Views
Last Modified: 2013-12-26
hi
 i want to create a unicode database in oracle8i. i have created an instance with the charset UTF-8 . how can i confirm that this database is unicode supported ?  
i tried a few things but i am not sure. i created a table :-

create table test(
name varchar2(60)
);

then i insert a thai value using the line : insert into test values ('ทฟพอริ');
if i retrieve this value in sqlplus , i get to see the result correctly in thai font. However , if i use Powerbuilder PB10.5 to retrieve it, i see alien fonts like ·¿¾ÍÃ×

so i would like no know how can i confirm that my database is unicode compliance , how can i insert data into the database in unicode format ?

can anyone help me on this ?

thanks.  
0
Comment
Question by:orinauts
13 Comments
 
LVL 22

Expert Comment

by:Helena Marková
ID: 18805862
Your database is unicode, but you have to set PowerBuilder to display unicode characters. So I hope someone with PowerBuilder knowledge will help you.
0
 
LVL 18

Expert Comment

by:diasroshan
ID: 18805907
hi,

there is nothing wrong with ur Oracle settings if its retrieving in SQL Plus...

how r u retrieving ur table in PB... thru a DW or using database profile in PB...

If ur using a DW then have the right thai font for ur column.

Cheers,
Rosh
0
 

Author Comment

by:orinauts
ID: 18806058
hi i am retrieving my table thru database profile. however , if i tick on the DisableUnicode , it shows the value correclty. But , i dont want that as that is Disabling Unicode. I want to store it and view it in unicode.

is there any settings ? the data that i have store , it is in Unicode rite ?
0
 
LVL 47

Expert Comment

by:schwertner
ID: 18806639
To confirm that the DB is with Unicode Character set use as SYS:

SQL>select value from nls_database_parameters;
and pay attention to 'NLS_CHARACTERSET' and NLS_NCHAR_CHARACTERSET'

After that you have to localize your cleint station.
It is using particular language (e.g. German).
So the localization includes telling this to the software.
If your software uses Oracle Client software
find in the Registry NLS_LANG parameter and put an
appropriate value there like
NLS_LANG=GERMAN_GERMANY.UTF8

If this is not the case you have to change the Local Settings of your computer.
Also try to investigate how PowerBuilder localizes the installation.
This should be mentioned in the docs and also could be found
in the Internet.
0
 
LVL 3

Expert Comment

by:harry_hendrata
ID: 18807412
When you try to use sqlplus, make sure that the NLS_LANG set at your end is what you want to see, for example, in my case, if the database is UTF8, and i have inputted chinese data and i would like to view them, then the my environment would need to set to AMERICAN_AMERICA.ZHT16BIG5 -- then you should be able to view the BIG5 characters that are in the database, provided that the data stored in the database is BIG5 in UTF8.

0
 

Author Comment

by:orinauts
ID: 18834968
i have another question. Now i want to create a new oracle 9i database that has unicode support. So the option that i choose should be ?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:orinauts
ID: 18835106

 OK. For now, i have created a database instance in Oracle8i using UTF8. So means my database is unicode compliance rite ? I have also changed the nls_lang in the registry, however , i do not know what specific value should i set there , is it thai_thailand.th8iisascii , or thai_thailand.utf8 , or thai_thailand.th8macthai or th8macthais ?

the problem i face now is even i have stored thai font into the database , if i retrieve it using powerbuilder db profile , it still shows me garbage unless i tick it to DisableUnicode. But i think i SHOULD not tick it as that would disable unicode. Am i rite here ?

i did a select value from nls_database_parameters; as mention above and the result is :-

VALUE                                                                          
--------------------------------------------------------------------------------
AMERICAN                                                                        
AMERICA                                                                        
$                                                                              
AMERICA                                                                        
.,                                                                              
UTF8                                                                            
GREGORIAN                                                                      
DD-MON-RR                                                                      
AMERICAN                                                                        
BINARY                                                                          
HH.MI.SSXFF AM                                                                  

VALUE                                                                          
--------------------------------------------------------------------------------
DD-MON-RR HH.MI.SSXFF AM                                                        
HH.MI.SSXFF AM TZH:TZM                                                          
DD-MON-RR HH.MI.SSXFF AM TZH:TZM                                                
$                                                                              
BINARY                                                                          
UTF8                                                                            
8.1.7.0.0  

please advice ,

thanks.
0
 
LVL 47

Accepted Solution

by:
schwertner earned 125 total points
ID: 18835466
To create 9i DB with Unicode use DBCA (database creation assistance) and in the Character Set tab use AL32UTF8 (this stands for up to 4 bytes Inicode and covers all languages).
Forget Oracle 8 ... it is history.

next check the version of Powerbuilder you use. Does it uses Unicode ?
On the server you have to set NLS_LANG=.UTF8
But on the Client machine (where Powerbuilder works) you have to set (if and only if you work using Oracle Client)

NLS_LANG=thai_thailand.utf8

If you do not use Oracle client then set Local Setting of the Computer to thai_thailand.

Detailed info I hope could be found in the PowerBuilder Manuals or using Google.
0
 

Author Comment

by:orinauts
ID: 18835878
ok. i have created the database. but when i use powerbuilder db profile to view. i created a table and tried to store some thai values there. when i use sqlplus to select , i can see the thai font. but if i use db profile, i see it as alien language unless i tick on the disable unicode. i have tried what u mentioned above.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 18835968
0
 

Author Comment

by:orinauts
ID: 18836030
i have another question. when i am creating the database , for the Use unicode , i select AL32UTF8 , but for the part for NAtional Character set , do i choose UTF8 or AL16UTF16 ?
0
 

Author Comment

by:orinauts
ID: 18836065
or if have choose UTF8 , is it wrong ? or is it still possible to change it after i have finish creating it ?

thanks.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 18836144
AL16UTF16 is the correct answer
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
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.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

757 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

16 Experts available now in Live!

Get 1:1 Help Now