1

We have a requirement where in we need to send data from an IBM i (AS400) system to a Mainframe system. The data is a combination of Chinese and English characters. We are connecting to AS400 using JDBC driver and writing the data using Spring batch. The mainframe team has confirmed that the code page that they use at their side is CP935 for Chinese character column. So while setting the encoding property of the ItemWriter in spring we have used Cp935, they are able to correctly decipher the Chinese characters Hex values but the English characters in the file are not legible at their end.

Is there any way to have multiple encoding in the single file, like Cp037 for English column and Cp935 for Chinese column?

We are sending the file to Mainframe using connect direct? Is there a possibility that C:D might me changing he code page?

  • Does the database support Unicode? Code pages are a bit archaic. – Wyzard Aug 19 '15 at 15:05
  • Doesn't it all come down to what character encoding are you trying to use? – Sled Aug 19 '15 at 15:08
  • What are they reading it with in the Mainframe (programming language which is going to process your file)? If they just "look" at the data, (ISPF Browse/View/Edit) it will not show distinct character sets within one record. You've written something on Linux/Unix/Windows to connect to the IBM i and then to the IBM z? Any particular reason you don't let them talk to each other more directly? – Bill Woodger Aug 19 '15 at 17:28
  • @Bill , the system that we read from is a legacy system. so all the data into and from the system is passed via our Spring batch application. And one correction(if it helps) we are connecting to DB2 via JDBC to read from AS400 – user5243747 Aug 20 '15 at 04:57
  • In the old days, we use shift-out shift-in to embrace double-byte Chinese char. Those outside the shift-out shift-in are English – Alvin SIU Sep 14 '15 at 07:04

1 Answers1

0

Use Unicode, which has several encodings (Unicode Text Formats) like UTF-8: 1208. See the 1200 code page range. For HTML like text UTF-8 is fine for Chinese w.r.t. size, otherwise with more chinese you might want another encoding.

Joop Eggen
  • 107,315
  • 7
  • 83
  • 138