.TH uni2ascii 1 "December, 2005" .SH NAME uni2ascii \- convert UTF-8 Unicode to various 7-bit ASCII representations .SH SYNOPSIS .B uni2ascii [options] .SH DESCRIPTION .I uni2ascii converts UTF-8 Unicode to various 7-bit ASCII representations. It reads from the standard input and writes to the standard output. .PP Command line options are: .sp 1 .TP .B \-h Help. Print the usage message and exit. .TP .B \-v Print program version information and exit. .TP .B \-l Use lower-case a-f when generating hexadecimal numbers. .TP .B \-q Quiet. Do not chat unnecessarily while working. .TP .B \-n Convert newlines too. By default, they are left alone. .TP .B \-p Pure. Convert characters within the ASCII range as well as those above. .TP .B \-s Convert space characters too. By default, they are left alone. .TP .B \-w Add a space after each converted item. .TP .B \-A Generate hexadecimal numbers with prefix U in angle-brackets (). .TP .B \-B Generate \\x-escaped hex (e.g. \\x00E9) .TP .B \-C Generate \\x escaped hexadecimal numbers in braces (e.g. \\x{00E9}). .TP .B \-D Generate decimal HTML numeric character references (e.g. ȳ) .TP .B \-E Generate hexadecimal with prefix U (U00E9). .TP .B \-F Generate hexadecimal with prefix u (u00E9). .TP .B \-G Convert hexadecimal in single quotes with prefix X (e.g. X'00E9'). .TP .B \-H Generate hexadecimal HTML numeric character references (e.g. é) .TP .B \-I Generate hexadecimal UTF-8 with each byte's hex preceded by an =-sign (e.g. =C3=A9) .TP .B \-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. .TP .B \-K Generate octal UTF-8 with each byte escaped by a backslash (e.g. \\303\\251) .TP .B \-L Generate \\U-escaped hex outside the BMP, \\u-escaped hex within the BMP. .TP .B \-P Generate hexadecimal numbers with prefix U+ (e.g. U+00E9) .TP .B \-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. .TP .B \-R Generate raw hexadecimal numbers (e.g. 00E9) .TP .B \-U Generate \\u-escaped hexadecimal numbers (e.g. \\u00E9). .TP .B \-X Generate standard hexadecimal numbers (e.g. 0x00E9). .TP .B \-Z 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. .PP 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. .SH "EXIT STATUS" .PP The following values are returned on exit: .IP "0 SUCCESS" The input was successfully converted. .IP "2 I/O ERROR" A system error ocurred during input or output. .IP "3 INFO" The user requested information such as the version number or usage synopsis and this has been provided. .IP "5 BAD OPTION" An incorrect option flag was given on the command line. .IP "8 BADRECORD" Ill-formed UTF-8 was detected in the input. .SH "SEE ALSO" ascii2uni(1) .sp 1 .SH AUTHOR Bill Poser (billposer@alum.mit.edu) .SH LICENSE GNU General Public License