| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package uk.me.parabola.imgfmt.app.labelenc; |
| 18 |
|
| 19 |
import java.io.PrintStream; |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 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 |
} |