Debian Codegraph @

src/uk/me/parabola/imgfmt/app/labelenc/TableCreator.java

raw symbols SCIP
1 /*
2 * Copyright (C) 2007 Steve Ratcliffe
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 *
14 * Author: Steve Ratcliffe
15 * Create date: 04-Nov-2007
16 */
17 package uk.me.parabola.imgfmt.app.labelenc;
18
19 import java.io.PrintStream;
20
21 /**
22 * Call this with a unicode row number and it will produce an empty table
23 * that can be modified.
24 *
25 * @author Steve Ratcliffe
26 */
27 public class TableCreator {
28 public static void main(String[] args) {
29 int row = Integer.parseInt(args[0]);
30
31 PrintStream out = System.out;
32
33 out.println("");
34 out.println("# This is table for transliterating characters in the range");
35 out.format( "# from U+%02x00 to U+%02xff\n", row, row);
36 out.println("#");
37 out.println("# The first column is the unicode character and the second");
38 out.println("# column is the transliteration of that character to ascii characters.");
39 out.println("# One or more characters can be used, for example for a character æ which");
40 out.println("# is a combined a and e you could write 'ae' (without the quotes) as the ");
41 out.println("# transliteration.");
42 out.println("#");
43 out.println("# There are languages where this will not work very well, in case");
44 out.println("# another approach should be tried.");
45 out.println("#");
46 out.println("# Any line can be deleted and will default to a '?' character");
47 out.println("#");
48 out.println("");
49
50 for (int i = 0; i < 256; i++) {
51 out.format("U+%02x%02x ? # character %c\n",
52 row, i, (char) (row*256+i));
53 }
54 }
55 }