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

Home -> Community -> Usenet -> c.d.o.server -> Re: UTL_FILE to handle French characters

Re: UTL_FILE to handle French characters

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Thu, 27 May 2004 20:45:31 +0200
Message-ID: <c95cok$knj$1@news3.tilbu1.nb.home.nl>


Max wrote:

> Sybrand Bakker <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:<osb7b05ors9i6d3s900ujdvanbhr84nveq_at_4ax.com>...
> 

>>On 25 May 2004 12:43:05 -0700, xiangminyao_at_yahoo.com (Max) wrote:
>>
>>
>>>Hello everyone,
>>>
>>>I am trying to use UTL_FILE in one of my PL/SQL routines and
>>>everything
>>>works perfectly except for one small thing : I am loosing all my
>>>accents
>>>in French and any other languages using accents. E.g. ÃToronto in
>>>database, I got Ã\203Toronto in the data file.
>>>
>>>Anybody has any idea how to make this work? I have tried seting my
>>>NLS_LANG to a different value to make them appear but it won't work.
>>>COuld the problem be with UTL_FILE itself not handling 8-bits
>>>characters?
>>>
>>>Any help is appreciated.
>>>
>>>Thanks,
>>>Max
>>
>>
>>You will probably only get help if you specify *exactly* what you are
>>doing, including your NLS_LANG setting *and* the characterset of your
>>O/S, *and* your version, *and* your O/S, as is always requested to
>>everyone.
>>No one here can pull out a crystall ball and see what you are doing
>>exactly
> 
> 
> 
> The purpose of my program is extract data from Infranet database
> (Oracle 8.1.7) by using utl_file in PL/SQL script. The database is
> running on SunOS. The character set of the database is UTF8. I have
> the following settings in my profile
> 
> NLS_LANG=AMERICAN_AMERICA.UTF8
> LANG=C
> LC_CTYPE=iso_8859_1
> stty cs8 -istrip -parenb 
> 
> The data file should be fixed length. Because French character always
> occupies two bytes, the columns after the French character is moved
> one character right.

You're wrong there.
iso_8859_1 (ISO Latin 1) uses the extended ASCII set, 1 byte for each character.
AL32UTF8 on the other hand, uses up to 4 byte per character. Characters from the extended ASCII set (like 8859_1, or ISO Latin-1) take 1, 2 or 3 byte.

I would set your Oracle NLS settings to WE8ISO8859P1 while loading, as your *data* is not UTF, but ISO.

-- 

Regards,
Frank van Bortel
Received on Thu May 27 2004 - 13:45:31 CDT

Original text of this message

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