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_FILE read multibyte character and then write it to file

UtsavOct 4 2017 — edited Oct 4 2017

I am reading a file using utl_file package, this file contains a word "hämorrhagic"

Now, I use utl_file.fopen_nchar()

But, sooner sys owned package reads it from text file, it got distorted as a Junk character "h rrhage"

-----------------------

I've a solution to write a multibyte character, by converting the special text into raw using UTL_RAW.CAST_TO_RAW function

which means, if I place "hämorrhagic" in a variable and before writing it to text file, I utl_file.put_line(use utl_raw.cast_to_raw(l_string));

it gets written back as "hämorrhagic"

My ask is, is there any way to read the text file in Oracle directory directly as RAW ? so far there is not oracle procedure to do so.

Any help would be much appreciated.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 1 2017
Added on Oct 4 2017
5 comments
748 views