Convert String from ASCII to EBCDIC in Java?

后端 未结 10 1877
北荒
北荒 2020-11-28 10:38

I need to write a \'simple\' util to convert from ASCII to EBCDIC?

The Ascii is coming from Java, Web and going to an AS400. I\'ve had a google around, can\'t seem

10条回答
  •  广开言路
    2020-11-28 11:26

    You should use either the Java character set Cp1047 (Java 5) or Cp500 (JDK 1.3+).

    Use the String constructor: String(byte[] bytes, [int offset, int length,] String enc)

提交回复
热议问题