Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: UTL_FILE to handle French characters
Max wrote:
> Sybrand Bakker <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in message news:<osb7b05ors9i6d3s900ujdvanbhr84nveq_at_4ax.com>... >
> > > > 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 BortelReceived on Thu May 27 2004 - 13:45:31 CDT