Skip to Main Content

SQL & PL/SQL

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!

Casting from Hex to char

564035Oct 20 2007 — edited Oct 20 2007
Hi,

I have a variable with the following hex characters:

3c61746167313e0ac7cde3cf20c7e1dac8cf0a3c2f61746167313e

which is in fact an arabic character converted from charcter set 1256.

I need to change it back to proper Arabic character but its mixing up some of the letters.

I did as follows:

select utl_raw.cast_to_varchar2('3c61746167313e0ac7cde3cf20c7e1dac8cf0a3c2f61746167313e') from dual;

it mixes up some letters.

Can we specify a character set when casting hex?
I mean if the hex representation was from character set 1256 (in windows) , and the oracle client recieves 8859P6 characterset, how can we make it compatible?

regards

Abdullah
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 17 2007
Added on Oct 20 2007
2 comments
2,520 views