IBM Data Studio unload/extract works, but load doesn't populate table with special characters properly?

1.2k views Asked by At

I was using Data Studio, I export the data in a table into a .data file. I delete the contents of the table through an SQL statement. When I re-import the data through loading, for some reason the special characters are not correctly imported.

I've checked the .data file in Notepad++, and the special characters were successfully extracted, so I wonder why the import of the file back into the table wouldn't work?

Characters I'm referring to are mostly french, as in é, À, so on. It's just strange to me it can't properly load it's own own load. I use the GUI for the loading and unloading. Would unloading and loading to and from a csv file be better?

Thank you for any help.

Edit: Thank you P. Vernon, you were really a life saver when I saw your response this morning. Made a day I thought was going to be a pain a breeze, as I really needed the change done today, and certain privileges since we changed database tool to data studio aren't working properly for our team, so this was the only way I could do it. They should just make the encoding utf 8 automatic, like your link mentioned!

1

There are 1 answers

0
Paul Vernon On BEST ANSWER

Is your Preferences - Workspace - "Text file encoding" set to something other than UTF-8? (UTF-8 is the default if using a Linux desktop, but on Windows 7 at least, it looks like the default is Cp-1252. I wonder if Windows 10 is the same.. https://stijndewitt.com/2010/05/05/unicode-utf-8-in-eclipse-java/)

If so that could be one reason for the issue you describe.

There are certainly other ways to export and import data in Db2. Maybe describe your use case, and we could advise better which method might be best for you.

Are you using the "Administration Explorer" or the "Data Source Explorer" to unload/load your data? The former has options to use the EXPORT, IMPORT or LOAD utilities via the GUI. See here for examples

If you have a support contract with IBM, you could raise a Case for this issue if you need the "Extract..." and "Load..." features of the "Data Source Explorer" and the equivalent "Unload with SQL" and "Load with SQL" from the "Administration Explorer" to be independent of the Workspace (or possibly Project) text file encoding.