Skip to content

Instantly share code, notes, and snippets.

@kuninet
Created September 22, 2017 02:33
Show Gist options
  • Save kuninet/a93c95d3c25eb10270632dd3e3d180f4 to your computer and use it in GitHub Desktop.
Save kuninet/a93c95d3c25eb10270632dd3e3d180f4 to your computer and use it in GitHub Desktop.
import java.io.UnsupportedEncodingException;
public class EBCDICtest {
public static void main(String[] args) {
byte[] ibm=null;
try {
String unicode = "T0001 アイウエオ";
ibm = unicode.getBytes("Cp930");
} catch(UnsupportedEncodingException e) {
}
for(int i=0;i<ibm.length;i++)
System.out.printf("%02X\n",ibm[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment