Java Reference
In-Depth Information
C:\javasrc\strings> java strings.UnicodeChars
Character #0 is a
Character #1 is b
Character #2 is c
Character #3 is %
Character #4 is |
Character #5 is
Character #6 is )
Accumulated characters are abc%|)
The Windows system used to try this doesn't have most of those characters either, but at least
it prints the ones it knows are lacking as question marks (Windows system fonts are more ho-
mogenous than those of the various Unix systems, so it is easier to know what won't work).
On the other hand, it tries to print the Yen sign as a Spanish capital Enye (N with a ~ over it).
Amusingly, if I capture the console log under Windows into a file and display it under Unix,
the Yen symbol now appears:
Character #0 is a
Character #1 is b
Character #2 is c
Character #3 is ¥
Character #4 is ?
Character #5 is ?
Character #6 is ?
Accumulated characters are abc¥___
where the “_” characters are unprintable characters, which may appear as a question mark
(“?”).
On a Mac OS X using the standard Terminal application and default fonts, it looks a bit bet-
ter:
$ java -cp build strings.UnicodeChars
Character #0 is a
Character #1 is b
Character #2 is c
Character #3 is ¥
Character #4 is Ǽ
Character #5 is Α
Character #6 is Ω
Accumulated characters are abc¥ǼΑΩ
Search WWH ::




Custom Search