Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33

    Unanswered: Turkish text file Load

    Anyone can help me?
    How can I load Turkish text files (with special characters) into a DB2 table? I have tried the load setting the DB2CODEPAGE variable to 1208 and my DB were created as CODESET 'UTF-8' TERRITORY 'TR'.

  2. #2
    Join Date
    Jun 2003
    Location
    İstanbul
    Posts
    19

    Re: Turkish text file Load

    Hi,

    You have not given any explanation about the error messages you have or what the exact problem is (data is not being loaded, special characters doesn't seem to be correctly written into db..etc ). So I assume you have difficulty in writing and displaying Turkish characters in the text file.

    I have tried the load oparation with your settings.
    A database with CODESET 'UTF-8' and TERRITORY 'TR'

    The command I have used to load data:
    db2 load from C:\data.del of del modified by codepage=1254 replace into mytable

    The format of the data in data.del file:
    1, i
    2,

    Structure of mytable:
    CREATE TABLE MYTABLE(
    C1 INT,
    C2 VARCHAR(50))

    It works well with this configuration.

    You can add "modified by codepage=1254" to your load command if you haven't before and then try.

    I hope this helps.

    KezbanB
    Kezban

  3. #3
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33
    Many, many, many thanks.

    I've tried your solution, and all is loaded right.

    I have only a question. I noted that you imports turkish files with codepage=1254, but creating the DB with TR setting i have a codepage=1208? I have to change it? How can I change it?

    One more time, many thanks.

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Once the database is created you cannot change the codepage and territory

    Sathyaram

    Originally posted by dvillani
    Many, many, many thanks.

    I've tried your solution, and all is loaded right.

    I have only a question. I noted that you imports turkish files with codepage=1254, but creating the DB with TR setting i have a codepage=1208? I have to change it? How can I change it?

    One more time, many thanks.
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  5. #5
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33
    Originally posted by sathyaram_s
    Once the database is created you cannot change the codepage and territory

    Sathyaram
    I agree, but the only settings we can specify on a DB creation are only territory and code-set. I'm asking how to tell db2 to use a particular code page.

  6. #6
    Join Date
    Oct 2003
    Posts
    7
    Code set is a name for an encoding scheme. Code page is a number for an encoding scheme. You can find the code set and code page relationship in DB2 Administration Guide - National Language Consideration.

    Sherman Lau

  7. #7
    Join Date
    Aug 2003
    Location
    Italy
    Posts
    33
    OK. Thanks.

Posting Permissions

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