Thursday, February 16, 2012

Oracle Writing multi lingual characters with Oracle file IO

If you have multi lingual characters like chinese to be written in a file or excel sheet from tables, using orcale file IO, It requires UTF-8 conversion. Just convert the character to UTF8 and write it. I tried using the utl_file.put raw, but i failed. When i used the below, it was working fine for me.
 l_file_handle:= utl_file.fopen('D:\',test.csv','W');
utl_file.put_line(l_file_handle,convert(l_str_head1,'UTF8'),TRUE);