「Shift JIS 文字一覧を作成」の版間の差分
ナビゲーションに移動
検索に移動
(ページの作成:「==Shift JIS 文字一覧を作成の編集== *[http://ja.wikipedia.org/wiki/Microsoft%E3%82%B3%E3%83%BC%E3%83%89%E3%83%9A%E3%83%BC%E3%82%B8932 Microsoftコードペー…」) |
|||
(同じ利用者による、間の1版が非表示) | |||
1行目: | 1行目: | ||
− | ==Shift JIS | + | ==[[Shift JIS 文字一覧を作成]]の編集== |
*[http://ja.wikipedia.org/wiki/Microsoft%E3%82%B3%E3%83%BC%E3%83%89%E3%83%9A%E3%83%BC%E3%82%B8932 Microsoftコードページ932] | *[http://ja.wikipedia.org/wiki/Microsoft%E3%82%B3%E3%83%BC%E3%83%89%E3%83%9A%E3%83%BC%E3%82%B8932 Microsoftコードページ932] | ||
*[http://ja.wikipedia.org/wiki/Unicode Unicode] | *[http://ja.wikipedia.org/wiki/Unicode Unicode] | ||
25行目: | 25行目: | ||
BufferedWriter writer = new BufferedWriter(new FileWriter(out)); | BufferedWriter writer = new BufferedWriter(new FileWriter(out)); | ||
− | for (int hb = start; hb | + | for (int hb = start; hb<=end; hb++) { |
− | for (int lb = 0x40; lb | + | for (int lb = 0x40; lb<=0xff; lb++) { |
if (((lb - 0x40) % 0x10) == 0) { | if (((lb - 0x40) % 0x10) == 0) { | ||
writer.write(new String(new byte[]{0x0d,0x0a}, "MS932")); | writer.write(new String(new byte[]{0x0d,0x0a}, "MS932")); | ||
46行目: | 46行目: | ||
{{ref 01.JPG}} | {{ref 01.JPG}} | ||
---- | ---- | ||
− | {{include_html banner_html, "!Java"}} | + | {{include_html [[banner_html]], "!Java"}} |
2020年2月16日 (日) 04:31時点における最新版
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 矢木浩人