Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Unable to read a Unicode File using UTL_FILE
carla_rj_at_imagelink.com.br wrote:
> I'm trying to read a unicode file using UTL_FILE but it doesn't work.
>
> I used the following commands ro open and read the file:
>
> ARQUIVO UTL_FILE.FILE_TYPE;
> LINHA1 NVARCHAR2(500);
>
> ARQUIVO := UTL_FILE.FOPEN_NCHAR('TESTE', 'fornecedornaoproduto.txt',
> 'r');
> UTL_FILE.GET_LINE_NCHAR(ARQUIVO, LINHA1);
>
> When I see the value of variable LINHA1, I see only strange
> caracteres. It looks like it has opened the file as ASCII instead of
> Unicode.
>
> Thanks in advance for your help.
Where are you looking at the ouput of the variable? Have you tried debugging it in sqldeveloper as i know that handles unicode characters. I have just finished writing scripts that do similar things with asian characters so i know that it works - at least when the file is definitely UTF8! Received on Thu May 25 2006 - 10:15:27 CDT
![]() |
![]() |