Available in

(1) (1)/ja (1)/ja_JP

TOC

native2ascii(1)                                                native2ascii(1)



NAME

       native2ascii - native to ASCII converter

SYNOPSIS

       native2ascii [ -encoding encoding_name] [ -reverse ] [ -J  option ]
            [ inputfile [outputfile]]

DESCRIPTION

       The  javac(1) compiler and other Java tools can only process files that
       contain Latin-1 or Unicode-encoded (\udddd notation)  characters.   The
       native2ascii command converts files that contain other character encod-
       ing into files containing Latin-1 or Unicode-encoded charaters.

       If outputfile is omitted, standard  output  is  used  for  output.   If
       inputfile is also omitted, standard input is used for input.

OPTIONS

       The following options are supported:

       -encoding encoding_name
            Specifies  the encoding name that is used by the conversion proce-
            dure.   The  default  encoding  is  taken  from  system   property
            file.encoding.   The  encoding_name  string must be one taken from
            the first column of the table of supported encodings in  the  Sup-
            ported Encodings document:

            http://java.sun.com/j2se/1.4/docs/guide/intl/encoding.doc.html

       -reverse
            Performs  the  reverse  operation: converts a file with Latin-1 or
            Unicode-encoded characters to one with native-encoded  characters.

       J  option      Pass option to the Java virtual machine, where option is
                      one of the options described on the  man  page  for  the
                      java  application  launcher,  java(1).  For example, -J-
                      Xms48m sets the startup memory to 48 megabytes. It is  a
                      common convention for -J to pass options to the underly-
                      ing virtual machine.






                                  23 Apr 2001                  native2ascii(1)

COMMENTS

1
Alternatively, if you regularly translate using Gettext PO tools, you can use prop2po (http://translate.sourceforge.n … it/prop2po) from the Translate Toolkit which handles all ASCII escaping automatically.

e.g.
prop2po some.properties some.po
Edit some.po
po2prop -t some.properties some.po some-other.properties

Unescaping from some.properties happens immediately.  You edit some.po in a PO editor in UTF-8. Conversion back takes any Unicode characters and escapes them correctly for Java.  Painless.
2008-02-22 14:56:21
Add your comment here. Whitespace and linebreaks are preserved. URLs are linked automatically.
CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.