• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1136
  • Last Modified:

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.  
0
orinauts
Asked:
orinauts
1 Solution
 
Helena Markováprogrammer-analystCommented:
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
 
diasroshanCommented:
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
 
orinautsAuthor Commented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
schwertnerCommented:
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
 
harry_hendrataCommented:
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
 
orinautsAuthor Commented:
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
 
orinautsAuthor Commented:

 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
 
schwertnerCommented:
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
 
orinautsAuthor Commented:
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
 
orinautsAuthor Commented:
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
 
orinautsAuthor Commented:
or if have choose UTF8 , is it wrong ? or is it still possible to change it after i have finish creating it ?

thanks.
0
 
schwertnerCommented:
AL16UTF16 is the correct answer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now