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!

Utl_raw.convert, how to use it???--thanks a lot.

56543Jan 29 2004 — edited Jan 29 2004
server's character set: utf8
client's character set: zhs16gbk

create table abc(a raw(20));
insert into abc values(utl_raw.cast_to_raw('some chinese character'));
commit;
select * from abc;
-- is not a good character
select utl_raw.cast_to_varchar2(a) from abc;
-- is ok

but some times i need to change character set:
so i do:
select utl_raw.cast_to_varchar2(utl_raw.convert(a, 'ZHT16BIG5', 'ZHS16GBK')) from abc;
and it will fail

the sql is right, cause i can complie it without any errors. why will it fail when i execute it.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2004
Added on Jan 29 2004
3 comments
1,832 views