I have a pl/sql block that exporting some data as a csv file. unfortunately, when I open this file with excel I am having characters issue. When I open the file in notepad, it seems okay but not working in excel. any idea? thanks.
data in the table
data in the excel
data in notepad
try to set NLS_LANGUAGE but not working
I fixed the issue. Open your file in binary mode, using
t_fh := utl_file.fopen( p_dir, p_filename, 'wb' );
And use this to write to it
utl_file.put_raw( t_fh, utl_i18n.string_to_raw( 'èéê', 'WE8MSWIN1252' ) );
UTL_FILE.PUT_RAW(v_file_handle, v_newline);
v_newline RAW(2) := hextoraw('0A');
So I don’t have any special characters issue anymore