简体   繁体   中英

Writing Chinese and English characters to Mainframe in single file using Java

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?

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 wrt size, otherwise with more chinese you might want another encoding.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM