Link to home
Start Free TrialLog in
Avatar of orinauts
orinautsFlag for Malaysia

asked on

oracle unicode

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.  
Avatar of Helena Marková
Helena Marková
Flag of Slovakia image

Your database is unicode, but you have to set PowerBuilder to display unicode characters. So I hope someone with PowerBuilder knowledge will help you.
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
Avatar of orinauts

ASKER

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 ?
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.
Avatar of harry_hendrata
harry_hendrata

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.

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 ?

 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.
ASKER CERTIFIED SOLUTION
Avatar of schwertner
schwertner
Flag of Antarctica image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.
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 ?
or if have choose UTF8 , is it wrong ? or is it still possible to change it after i have finish creating it ?

thanks.
AL16UTF16 is the correct answer