Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ASCII and CHR in Oracle 11g

2827627Dec 22 2014 — edited Dec 23 2014

I have two oracle 11g databases.
I am checking special character 'é' in both.
In UTF16 database, if I select the value from table, I get ASCII code as 233 but if I directly query the special character , it shows 50089.
In UTF8 database, its 50089 in all the cases.
From where first database is showing 233 value?


Database1 is AL16UTF16.
-----------------------
select chr(233) from dual; --> null
select chr(50089) from dual; --> é
select ascii('é') from dual;  --> 50089
select ascii(substr(product_desc,2,1)) from htg_product_service where pr_level = 6; --> 233

Database2 is UTF8.
------------------------
select chr(233) from dual; --> null
select chr(50089) from dual; --> é
select ascii('é') from dual;  --> 50089
select ascii(substr(productdescription,2,1)) from prdservice.init_prod_setup_reqd_attrib where productcode = 'dowe64'; --> 50089

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 20 2015
Added on Dec 22 2014
7 comments
6,172 views