home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  

Java in a Nutshell

Previous Chapter 16
JDK Tools



native2ascii---Convert Java source code to ASCII


JDK 1.1 and later.


native2ascii [ options ] [ inputfile [ outputfile ]]


javac can only process files encoded in ASCII, with any other characters encoded using the \uxxxx Unicode notation. native2ascii is a simple program that reads a Java source file encoded using a local encoding and converts it to the ASCII-plus-encoded-Unicode form required by javac.

The inputfile and outputfile are optional. If unspecified, standard input and standard output are used, making native2ascii suitable for use in pipes.


-encoding encoding-name

Specifies the encoding used by source files. If this option is not specified, the encoding is taken from the file.encoding system property.


Specifies that the conversion should be done in reverse--from encoded \uxxxx characters to characters in the native encoding.

See Also

java.io.InputStreamReader, java.io.OutputStreamWriter

Previous Home Next
jdb Book Index serialver

Java in a Nutshell Java Language Reference Java AWT Java Fundamental Classes Exploring Java