This command converts a file from any code set into the US-ASCII (7 bit ASCII) code set.
Syntax
native2ascii [ Options ...] [input file[output file] ]
Options ...
One or more command line options, separated by blanks.
Input file
File which is to be converted. If input file is not specified, the input is expected on stdin.
Output file
Destination file for the conversion. If output file is not specified, output is on stdout.
output file and input file may also be the same.
Description
The native2ascii command converts text available in any code set (e.g OSD_EBCDIC_DF04_1) into US-ASCII (7-bit ASCII); non-printable characters in ASCII are printed in portable Unicode (\uxxxx). Conversion in the reverse direction is also possible. Portable Unicode is interpreted, for example, when property files are loaded.
If property files are stored in JAR archives, they must be present in code set ISO8859-1. The same applies to manifest files or other texts. This command makes it possible to prepare the corresponding files for this because the full US-ASCII code set is included in ISO8859-1.
As of JENV V1.4A policy files, which are used by the standard policy implementation, must be encoded in the UTF-8 codeset. native2ascii can be used for the conversion, as the UTF-8 codeset concurs with the first 127 characters of the US-ASCII codeset.
Options
-encoding character set
Specifies the character set from which or into which the command converts. If the option is not specified, the value set via the system property file.encoding is used. Since JENV V1.2A the default value for this system property is OSD_EBCDIC_DF04_1. Permitted values can be found in the Specification entitled “Supported Encodings” [14]. The character sets additionally supported since JENV V1.2A are described in section "Code sets".
-reverse
The conversion is performed in the reverse direction: A text which is present in character set US-ASCII is converted into the character set specified by -encoding. Any portable Unicode representations in the input (\uxxxx) are interpreted when this is done. Characters which cannot be shown in the output character set are output there in portable Unicode representation.
-J javaoption
Passes javaoption to the JVM, where javaoption is one of the options described for java.