TTYCONV(1)

NAME
ttyconv - Convert a TTY from one encoding to another

SYNOPSIS
ttyconv [-l ENCODING|--local=ENCODING] [-r ENCODING|--remote=ENCODING] [SHELL-COMMAND]
ttyconv [-V]

DESCRIPTION
ttyconv converts a TTY session from one encoding to another. It uses the GNU C Library's iconv(3) facility. This tool is useful when, for instance, you have a UTF-8 based system with national language and keyboard support and you still want to connect to systems that are unaware of this, or use a different (or bizarre) encoding. ttyconv is intended as a means of easing the transition from `legacy' (sic) applications to ones that are fully UTF-8 aware without limiting their output to the US-ASCII encoding.

ttyconv works by allocating a pseudo-tty, executing the specified command on the pty slave (the `remote'), and then translates:

•   the command's output from the `remote encoding' to the `local encoding' and prints it to standard output.

•   the user's input from the `local encoding' to the `remote encoding' and writes it to the pty's standard input.

SHELL-COMMAND is an ordinary shell command. The shell command (including any arguments) must appear at the end of the ttyconv command line. If omitted, the value of the user's SHELL environment variable is used to spawn a shell. As a last resort, /bin/sh is spawned.

EXIT STATUS
An exit status of zero indicates successful termination of the translated session. A non-zero exit status denotes abnormal termination due to an error that occurred while the terminal translation was being set up.

OPTIONS
ttyconv accepts the following arguments:

-l, --local=LOCAL-ENCODING
    Set the local encoding to LOCAL-ENCODING. The encoding must be given in a format understood by the iconv(1) utility. Use iconv -l for the full list of encodings. This argument is mandatory.

-r, --remote=REMOTE-ENCODING
    Set the remote encoding to REMOTE-ENCODING. The encoding must be given in a format understood by the iconv(1) utility. Use iconv -l for the full list of encodings. This argument is mandatory.

-?, --help
    List all available options and their meanings. --usage Display brief usage information.

-V, --version
    Show the program's version, credits and licensing.

BUGS
This is an early version. Bugs are sure to be lurking within.

RESTRICTIONS

Both translations are handled by calls to libiconv, and thus both forward and inverse conversions must be supported. This is not a problem if at one (or both) of the two encodings are flavours of Unicode (such as UTF-8). Other combinations of encodings may be a different story. Please refer to the iconv(1) man page for more details.

AUTHOR
Written by Alexios Chouchoulas.

REPORTING BUGS
Report bugs to Alexios Chouchoulas <alexios@bedroomlan.org>.

COPYRIGHT
Copyright © 2003 Alexios Chouchoulas <alexios@bedroomlan.org>.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

SEE ALSO
iconv(1), unicode(7), utf-8(7).