473,413 Members | 1,802 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

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 6512
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jan00000 | last post by:
Hi, I'm using Xalan to do some transforming of XML in Java. My problem is: I have unicode in my XML (i.e., German Umlauts (ä,ö,ü, and since they trouble me, I did not try out any other...
38
by: lawrence | last post by:
I'm just now trying to give my site a character encoding of UTF-8. The site has been built in a hodge-podge way over the last 6 years. The validator tells me I've lots of characters that don't...
1
by: cepl | last post by:
Working on extension of genericwiki.py plugin for PyBlosxom and I have problems with UTF-8 and RE. When I have this wiki line, it does break URL too early: ...
2
by: Homayoon | last post by:
Hi everyone I've encountered a problem with the UTF-8 encoded strings retreived from database. I have a web page that retreives information from a database running a SELECT statement and puts the...
22
by: Albert Oppenheimer | last post by:
I thought my program had to be caught in a loop, and cancelled it through the task manager. It took about one second in Java, but re-implemented in C, it had already run over one minute. I set...
6
by: archana | last post by:
Hi all, can someone tell me difference between unicode and utf 8 or utf 18 and which one is supporting more character set. whic i should use to support character ucs-2. I want to use ucs-2...
1
by: amandeep.bhatia1 | last post by:
Hello Friends, I am working on a project to support internationalization for a existing project. While supporting UTF-8 I am facing a problem , while doing POC. I have a C string which I...
23
by: Allan Ebdrup | last post by:
I hava an ajax web application where i hvae problems with UTF-8 encoding oc chineese chars. My Ajax webapplication runs in a HTML page that is UTF-8 Encoded. I copy and paste some chineese chars...
0
by: Mihai N. | last post by:
I have observed that there are a couple of character sets that are Very short answer: that meta tells the browser what the encoding of the web page is. If the browser gets the code page wrong,...
0
by: Tim Golden | last post by:
Darren Mansell wrote: This is a bit of a non-answer but... use pyodbc, use NVARCHAR cols, and use unicode values on insert: <code> import pyodbc import unicodedata
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.