Name
native2ascii — Convert text to ASCII with Unicode escapes
Synopsis
native2ascii [options
] [inputfile
[outputfile
]]
Description
native2ascii is a simple program that reads a text file (usually of Java source code) encoded using a local encoding and converts it to a Latin-1-plus-ASCII-encoded-Unicode form allowed by the Java Language Specification. This is helpful when you must edit a file of Java code but do not have an editor that can handle the encoding of the file.
The inputfile
and
outputfile
are optional. If unspecified,
standard input and standard output are used, making
native2ascii suitable for use in pipes.
Options
-
-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.-
-reverse
Specifies that the conversion should be done in reverse—from encoded
\u
xxxx
characters to characters in the native encoding.
See also
java.io.InputStreamReader
,
java.io.OutputStreamWriter
Get Java in a Nutshell, 5th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.