1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
Readme for Unicode Example
This example uses Japanese.
It illustrates Identifiers and Tokens
It also provides a debug class that displays the input and output in a window and logs to a log file in UTF-8 (This code was compiled with JDK1.2.2 JDK1.3 may not work due to the bit set initialization methods exceeding 64K for single method. I have not tried the latest JKD 1.3.1)
Follow these steps
1)Adding Japanese Fonts to Windows
i) Update InternetExplorer with the Japanese Font Option.
This will install the fonts MS Gothic and MS Mincho
ii) Install international version of JRE (standard version does not support international fonts)
iii) Replace ..../jre/lib/font.properties with font.properties from this dir.
iv) compile these java files and run StreamConvert
that is
javac -classpath .;c:\antlr *.java
You should now be able to run this example and see Japanese fonts.
If not sort out the problem and let me know what you did (I found this solution by chance)
java -classpath .;c\antlr StreamConverter
2) Run the sample code
java -classpath .;c:\antlr Main test.in
This will read a Shift-JIS file in and parse it and display the input and parser output in a debug window as well as write the output to a debug log file in UTF-8
Matthew Ford
Forward Computing and Control Pty. Ltd.
matthew.ford@forward.com.au
|