Page 1 of 1

ODBC encoding issue with chinese character under AIX 6.1

Posted: Wed Dec 22, 2010 3:52 am
by fyaqq
We tried both ODBC Enterprice stage and ODBC connector stage to
read data from MS SQL Server database into a sequential file.

For chinese characters, they can not be read correctly. We saw ? instead of
original chinese characters in the seqential file. But for ascii chacaters we have no problem.

I suspect it is an encoding issue but has no clue how to solve the problem.

Please shed some light on it. Thanks a lot!

Posted: Thu Dec 23, 2010 8:37 am
by PaulVL
"They cannot read ..." where are you trying to read it from? Downstream database? Sequential file on your DataStage server?

If you are doing a "View Data" then please make sure that your local character set for your client machine can display your chinese character set. You could also try to open the file in HEX mode to see if the double byte (chinese character set) data looks ok.

Posted: Sun Dec 26, 2010 9:16 pm
by fyaqq
I mean the chinese character can be read from the odbc data source
and written into the sequential file, but in the sequential file these chinese character become "?" instead of the one in the data source.

This is very likely to be an encoding issue, from my past experience.

I was wondering there must be a place to specify encoding in ODBC stage
, or odbc onfig file. But I can't find it now.

Posted: Mon Dec 27, 2010 12:39 am
by fyaqq
In Columns tab of ODBC stage, select unicode from the Extended column,
the issue is magically solved :-)

Posted: Mon Dec 27, 2010 12:42 am
by fyaqq
I am migrating jobs from windows environment to AIX 6.1 environment.
There are many jobs with the same issue.

I know I can manually edit each odbc stage and select "unicode" from extended column. Man, that's a lot of work.

Any hint how to accomplish it in a clever way?
Thanks a lot!

Posted: Mon Dec 27, 2010 7:22 am
by chulett
There's always the "export to dsx, edit the dsx and reimport" trick. Make sure you keep an unedited copy handy and work in isolation.

Posted: Mon Dec 27, 2010 3:20 pm
by ray.wurlod
You have marked this thread as Resolved. Please advise HOW it was resolved, to aid future searchers.

Posted: Mon Dec 27, 2010 10:53 pm
by fyaqq
ray.wurlod wrote:You have marked this thread as Resolved. Please advise HOW it was resolved, to aid future searchers. ...
I already mentioned it in my previous post.
Here it is again.

select unicode from the Extended column of the column tab.

Posted: Mon Dec 27, 2010 11:02 pm
by ray.wurlod
So, no "clever way" then?