Provided by:
uni2ascii_3.0-1_i386
NAME
uni2ascii - convert UTF-8 Unicode to various 7-bit ASCII
representations
SYNOPSIS
uni2ascii [options]
DESCRIPTION
uni2ascii converts UTF-8 Unicode to various 7-bit ASCII
representations. It reads from the standard input and writes to the
standard output.
Command line options are:
-h Help. Print the usage message and exit.
-v Print program version information and exit.
-l Use lower-case a-f when generating hexadecimal numbers.
-q Quiet. Do not chat unnecessarily while working.
-n Convert newlines too. By default, they are left alone.
-p Pure. Convert characters within the ASCII range as well as those
above.
-s Convert space characters too. By default, they are left alone.
-w Add a space after each converted item.
-A Generate hexadecimal numbers with prefix U in angle-brackets
(<U00E9>).
-B Generate \x-escaped hex (e.g. \x00E9)
-C Generate \x escaped hexadecimal numbers in braces (e.g.
\x{00E9}).
-D Generate decimal HTML numeric character references (e.g.
ȳ)
-E Generate hexadecimal with prefix U (U00E9).
-F Generate hexadecimal with prefix u (u00E9).
-G Convert hexadecimal in single quotes with prefix X (e.g.
X’00E9’).
-H Generate hexadecimal HTML numeric character references (e.g.
é)
-I Generate hexadecimal UTF-8 with each byte’s hex preceded by an
=-sign (e.g. =C3=A9)
-J Generate hexadecimal UTF-8 with each byte’s hex preceded by a
%-sign (e.g. %C3%A9). This is the URIescape format defined by
RFC 2396.
-K Generate octal UTF-8 with each byte escaped by a backslash (e.g.
\303\251)
-L Generate \U-escaped hex outside the BMP, \u-escaped hex within
the BMP.
-P Generate hexadecimal numbers with prefix U+ (e.g. U+00E9)
-Q Generate character entities (e.g. é) where possible,
otherwise numeric character references. This flag may not be
used by itself but must be used in combination with either the
-H flag for hexadecimal character references or the -D flag for
decimal character references.
-R Generate raw hexadecimal numbers (e.g. 00E9)
-U Generate \u-escaped hexadecimal numbers (e.g. \u00E9).
-X Generate standard hexadecimal numbers (e.g. 0x00E9).
-Z <format>
Generate output using the supplied format. The format specified
will be used as the format string in a call to printf(3) with a
single argument consisting of an unsigned long integer. For
example, to obtain the same output as with the -U flag, the
format would be: \u%04X.
If conversion of spaces is disabled (as it is by default), if space
characters outside the ASCII range are encountered (0x3000 ideographic
space, 0x1351 Ethiopic word space, and 0x1680 ogham space mark), they
are replaced with the ASCII space character (0x0020) so as to keep the
output pure 7-bit ASCII.
EXIT STATUS
The following values are returned on exit:
0 SUCCESS
The input was successfully converted.
2 I/O ERROR
A system error ocurred during input or output.
3 INFO The user requested information such as the version number or
usage synopsis and this has been provided.
5 BAD OPTION
An incorrect option flag was given on the command line.
8 BADRECORD
Ill-formed UTF-8 was detected in the input.
SEE ALSO
ascii2uni(1)
AUTHOR
Bill Poser (billposer@alum.mit.edu)
LICENSE
GNU General Public License
December, 2005 uni2ascii(1)