I'm using Oracle 11g on Windows 7 with national character set equal to AL16UTF16.
I'm trying to write 3 cyrillic letters with the following PL/SQL code:
declare
s nvarchar2(3):=nchr(1040) || nchr(1041) || nchr(1042);
fileHandler UTL_FILE.FILE_TYPE;
begin
fileHandler := UTL_FILE.FOPEN_NCHAR('TEMP', 'test.txt', 'W');
UTL_FILE.PUT_NCHAR(fileHandler,s);
UTL_FILE.FCLOSE(fileHandler);
end;
The resulting file is 5 bytes long. If I open the file in Notepad++ I can see the following: DLE DC1 DC2 with new line at the end (character 13+character 10). What is wrong with the code above?