Shift JIS 文字一覧を作成
ナビゲーションに移動
検索に移動
Shift JIS 文字一覧を作成の編集
Shift JIS 漢字一覧(1~3)のテキストファイルを作成する
public class CreateShiftJISCharSet {
public static void main(String[] args) {
CreateShiftJISCharSet test = new CreateShiftJISCharSet();
try {
test.doPrintChars("c:\\work\\kanji1.txt", 0x88, 0x98);
test.doPrintChars("c:\\work\\kanji2.txt", 0x98, 0xea);
test.doPrintChars("c:\\work\\kanji3.txt", 0xfa, 0xfc);
} catch (Exception e) {
e.printStackTrace();
}
}
private void doPrintChars(String outFileName, int start, int end) throws Exception {
File out = new File(outFileName);
BufferedWriter writer = new BufferedWriter(new FileWriter(out));
for (int hb = start; hb<=end; hb++) {
for (int lb = 0x40; lb<=0xff; lb++) {
if (((lb - 0x40) % 0x10) == 0) {
writer.write(new String(new byte[]{0x0d,0x0a}, "MS932"));
}
byte[] c = {(byte)hb, (byte)lb};
writer.write(new String(c, "MS932"));
}
}
writer.flush();
System.out.println("finish.");
}
}
生成後、"?" などの文字を上記IMEを確認しながら編集する。 テンプレート:Ref Shift JIS 漢字1.txt テンプレート:Ref Shift JIS 漢字2.txt テンプレート:Ref Shift JIS 漢字3.txt
{{include_html banner_html, "!Java"}}
© 2006 矢木浩人