Problems with Import of UTF-8 files - Differences between LOAD andIMPORT

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stefan

    Problems with Import of UTF-8 files - Differences between LOAD andIMPORT

    Hi,

    When I import data from an CSV file, data seems to be converted (into
    iso-8851-1 ???) although the csv data and the db are in utf-8 format.
    I also tried "modified by codepage=1208" but it failed too. (but with
    different import results):
    import from xy.csv of del modified by coldel; replace into tmp

    If I do the same statement with LOAD instead of IMPORT it works fine.

    DB was created with:
    CREATE DATABASE testdb USING CODESET UTF-8 TERRITORY DE.
    The CSV file was saved in utf-8 format with open office.
    Before connecting to the database locale was set with "export
    LANG=de_DE.UTF-8"


    DB2/LINUX 7.2.9 (V7 with fixpack 12)

    I know this is an old DB2 Version but Migration is planned for next year.

    Thanks for any hint

    Stefan






  • Colin Booth

    #2
    Re: Problems with Import of UTF-8 files - Differences between LOAD and IMPORT

    Stefan wrote:
    Hi,
    >
    When I import data from an CSV file, data seems to be converted (into
    iso-8851-1 ???) although the csv data and the db are in utf-8 format.
    I also tried "modified by codepage=1208" but it failed too. (but with
    different import results):
    import from xy.csv of del modified by coldel; replace into tmp
    >
    If I do the same statement with LOAD instead of IMPORT it works fine.
    >
    DB was created with:
    CREATE DATABASE testdb USING CODESET UTF-8 TERRITORY DE.
    The CSV file was saved in utf-8 format with open office.
    Before connecting to the database locale was set with "export
    LANG=de_DE.UTF-8"
    >
    >
    DB2/LINUX 7.2.9 (V7 with fixpack 12)
    >
    I know this is an old DB2 Version but Migration is planned for next year.
    >
    Thanks for any hint
    >
    Stefan

    I think that I have had a similar problem (a few years ago with V7) Try
    setting the DB2CODEPAGE variable to 1208 for the client.

    Colin

    Comment

    • Stefan

      #3
      Re: Problems with Import of UTF-8 files - Differences between LOADand IMPORT

      Colin Booth schrieb:


      I think that I have had a similar problem (a few years ago with V7) Try
      setting the DB2CODEPAGE variable to 1208 for the client.
      >
      Colin

      I've tried that but the behavior is the same.
      I will use LOAD now. It's not the best solution (tablespace access is
      denied) but I hope that IMPORT will work too after migration to V9.

      thanks for your feedback.

      Stefan



      Comment

      • db2admin

        #4
        Re: Problems with Import of UTF-8 files - Differences between LOADand IMPORT

        On Feb 20, 7:41 am, Stefan <s...@nospam.co mwrote:
        Colin Booth schrieb:
        >
        I think that I have had a similar problem (a few years ago with V7) Try
        setting the DB2CODEPAGE variable to 1208 for the client.
        >
        Colin
        >
        I've tried that but the behavior is the same.
        I will use LOAD now. It's not the best solution (tablespace access is
        denied) but I hope that IMPORT will work too after migration to V9.
        >
        thanks for your feedback.
        >
        Stefan
        Hello,
        I was having similar issues as well and I remember keeping codepage
        same on source and destination databases as well as OS
        or as long as they support the language. I was exporting german and
        importing back into another database in a another server.
        I read following articles which were great help




        regards

        Comment

        Working...