by G. Adam Stanislav
Whiz Kid Technomagic
Muni converts character numbers from Matthews’ Chinese-English Dictionary into their corresponding Unicode values.
It reads its input from stdin, ignores anything that is not a decimal number, then sends a 4-digit hexadecimal value to stdout.
If the input value is not valid (1-7773), muni will tell you. If there is no corresponding Unicode value, again, muni will say so.
Muni repeats this process until input ends. To end input under Unix, press ctl-D; under DOS/Windows, press ctl-Z.
Because muni ignores non-numeric input, you can form a query. For example, to see the Unicode for the characters in my Chinese name, which is Yung Kang, we can start by looking up the characters in Matthews’ Dictionary. The values listed for my name are Yung = 7589, and Kang = 3268.
To find their Unicode representation, we can type this query:
% muni : What is Unicode for Yung (7589), and Kang (3268)?
The program will print:
- Matthews(7589) = U+6C38 - Matthews(3268) = U+525B :
We then type ctl-D (or ctl-Z in DOS) to quit.
Of course, we could have just typed:
% muni : 7589 : 3268 : ^D
and would have obtained the same result. So, the Unicode value for Yung is U+6C38, and for Kang U+525B.
Now, suppose we want to place my Chinese name on a web site. We can create the html file, and enter 永 剛 wherever we want to the name to appear.
Finally, we can convert the result to a UTF-8 encoded html file using my utrans series of programs, and place it on the web.
Assuming you have the right fonts on your system, you can see the result here:
Just in case you do not have the right fonts, here it is as two graphics:
The m7773 utility simply prints numbers 1 - 7773 to stdout, each on a separate line. This allows you to produce a complete listing of Unicode values for the entire dictionary by piping its output to muni, like this:
% m7773 | muni
To get your own copy of muni, right-click on muni-1.0.tar.gz. This is a Unix tar file with source code, Makefile, and a copy of this page. However, Windows users can download it as well, because it also contains muni.exe and m7773.exe.