Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Unable to read a Unicode File using UTL_FILE

Re: Unable to read a Unicode File using UTL_FILE

From: <robertsboyle_at_gmail.com>
Date: 25 May 2006 08:15:27 -0700
Message-ID: <1148570127.021402.152090@j33g2000cwa.googlegroups.com>

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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US