469,296 Members | 2,147 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,296 developers. It's quick & easy.

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


Feb 18 '08 #1
3 5972
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
Feb 19 '08 #2
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

Feb 20 '08 #3
On Feb 20, 7:41 am, Stefan <s...@nospam.comwrote:
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

http://www.ibm.com/developerworks/db...u/0210lau.html
http://www.ibm.com/developerworks/db.../dm-0506chong/

regards
Feb 28 '08 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by jan00000 | last post: by
1 post views Thread by cepl | last post: by
2 posts views Thread by Homayoon | last post: by
22 posts views Thread by Albert Oppenheimer | last post: by
6 posts views Thread by archana | last post: by
1 post views Thread by amandeep.bhatia1 | last post: by
23 posts views Thread by Allan Ebdrup | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.