ODBC encoding issue with chinese character under AIX 6.1

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
fyaqq
Participant
Posts: 43
Joined: Thu Aug 31, 2006 5:05 pm

ODBC encoding issue with chinese character under AIX 6.1

Post 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!
PaulVL
Premium Member
Premium Member
Posts: 1315
Joined: Fri Dec 17, 2010 4:36 pm

Post 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.
fyaqq
Participant
Posts: 43
Joined: Thu Aug 31, 2006 5:05 pm

Post 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.
fyaqq
Participant
Posts: 43
Joined: Thu Aug 31, 2006 5:05 pm

Post by fyaqq »

In Columns tab of ODBC stage, select unicode from the Extended column,
the issue is magically solved :-)
fyaqq
Participant
Posts: 43
Joined: Thu Aug 31, 2006 5:05 pm

Post 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!
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

You have marked this thread as Resolved. Please advise HOW it was resolved, to aid future searchers.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
fyaqq
Participant
Posts: 43
Joined: Thu Aug 31, 2006 5:05 pm

Post 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.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So, no "clever way" then?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply