I have read that Java uses UNICODE. And when I tried to put Extended ASCII characters as command line arguments to a Java program, it didn't display them correctly. Is there any way to display Extended ASCII character set in Java? (this question may be termed as a "hurried" question, as I have myself not experimented enough before asking you people). thanks.
Post the code that you used to play with the unicode.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Jan 27, 2001
Originally posted by Cindy Glass: Post the code that you used to play with the unicode.
You can take the example of simply using the statement: System.Out.println(arg); where arg represents a command line agrument. If you put in an extended ASCII character here, it will not display it correctly (at least on my system).
Joined: Sep 29, 2000
Well, it took some poking around, but I finally found this fascinating disertation on the Lexical Structure of the Java Language. http://java.sun.com/docs/books/jls/second_edition/html/lexical.doc.html The sum of it is that the conversion between unicode and ascii is a compile time function, and it happens very early in the compiling heirarchy. When you input a String at the command prompt there is no compiler around to translate it, there is only the JRE, so it will remain a String.