Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    1

    Unanswered: Flat files and UTF8 : love story

    Hi guys,

    I am currently having trouble with data extraction from an UTF8 database, here is what I am doing:

    - Storing data for several countries,
    - Willing to extract data containing "éàù" characters (stored in two bytes in Oracle).

    The setup is the following:
    - Linux RedHat9,
    - Oracle 9i (UTF8 database).
    - PL/SQL procedures using utl_file.fopen(dataPath,dataName,'a') and then utl_file.put ...

    The problem is that an extracted string won't respect the specifications because of the character size : "Pénalités" will be extracted as "Pénalités".

    My bloody goal is to get "Pénalités" readable in my extracted text file, as target systems won't be able to read it in another format.

    I have tried several NLS_LANG env variable unsuccessfully:
    AMERICAN_AMERICA.UTF8
    AMERICAN_AMERICA.AL32UTF8
    AMERICAN_AMERICA.WE8DEC
    FRENCH_FRANCE.UTF8
    FRENCH_FRANCE.AL32UTF8
    FRENCH_FRANCE.WE8DEC

    Hay hey, Oracle is a good product, but a little bit strange sometimes ...

    Hope it is clear enough,
    ora4ever

  2. #2
    Join Date
    Aug 2004
    Location
    France
    Posts
    754
    Hello,

    Well, it's strange, I would have thought that changing NLS_LANG to an ASCII character set would have made it work... Have you tried that ?
    Code:
    NLS_LANG=FRENCH_FRANCE.WE8ISO8859P1
    If it does not work, you can try using
    Code:
    Select CONVERT(string_data, 'WE8ISO8859P1', 'UTF8')
    From tablename
    Where ...
    instead of directly doing
    Code:
    Select string_data
    From tablename
    Where ...
    Please let me know if that works.

    HTH,

    Cordialement (profitons-en pour un peu parler français, sans en abuser ),

    RBARAER

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •