home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / ascii30.zip / doc / man < prev    next >
Text File  |  2000-08-07  |  5KB  |  130 lines

  1. ascii(1)           User Commands            ascii(1)
  2.  
  3. NAME
  4.      ascii -- report character aliases
  5.  
  6. SYNOPSIS
  7.      ascii [-dxohv] [-t] [char-alias...]
  8.  
  9. OPTIONS
  10.      Called with no options, ascii behaves like `ascii -h'.  Options
  11.      are as follows:
  12.  
  13.      -t      Script-friendly mode, emits only
  14.       ISO/decimal/hex/octal/binary encodings of the character.
  15.  
  16.      -s      Parse     multiple  characters.    Convenient  way     of  parsing
  17.       strings.
  18.  
  19.      -d      Ascii table in decimal.
  20.  
  21.      -x      Ascii table in hex.
  22.  
  23.      -o      Ascii table in octal.
  24.  
  25.      -h, -?
  26.       Show summary of options and a simple ASCII table.
  27.  
  28.      -v      Show version of program.
  29.  
  30. DESCRIPTION
  31.      Characters in the ASCII set can have many aliases, depending on
  32.      context. A character's possible names include:
  33.  
  34.      *    Its bit pattern (binary representation).
  35.  
  36.      *    Its hex, decimal and octal representations.
  37.  
  38.      *    Its  teletype mnemonic and caret-notation form (for  control
  39.     chars).
  40.  
  41.      *    Its backlash-escape form in C (for some control chars).
  42.  
  43.      *    Its printed form (for printables).
  44.  
  45.      *    Its full ISO official name in English.
  46.  
  47.      *    Its ISO/ECMA code table reference.
  48.  
  49.      *    Its name as an HTML/SGML entity.
  50.  
  51.      *    Slang and other names in wide use for it among hackers.
  52.  
  53.      This   utility  accepts  command-line  strings  and  tries      to
  54.      interpret them as one of the above. When it finds a  value,  it
  55.      prints all of the names of the character. The constructs in the
  56.      following list can be used to  specify character values. If  an
  57.      argument  could be interpreted in two or more ways,  names     for
  58.      all the different characters it might be are dumped.
  59.  
  60.      character     Any character not described by one of the following
  61.          conventions represents the character itself.
  62.  
  63.      ^character     A caret followed by a character.
  64.  
  65.      \character     A backslash followed by certain special  characters
  66.          (abfnrtv).
  67.  
  68.      mnemonic     An ASCII teletype mnemonic.
  69.  
  70.      hexadecimal A hexadecimal (hex) sequence consists of one or two
  71.          case-insensitive    hex    digit    characters
  72.          (01234567890abcdef). To ensure     hex  interpretation
  73.          use hexh, 0xhex, xhex or \xhex.
  74.  
  75.      decimal     A  decimal sequence consists of one, two  or  three
  76.          decimal  digit characters (0123456789).  To  ensure
  77.          decimal interpretation use \0ddecimal, ddecimal, or
  78.          \ddecimal.
  79.  
  80.      octal     An  octal sequence consists of one,  two  or  three
  81.          octal digit characters (01234567). To ensure  octal
  82.          interpretation     use  \octal,  0ooctal,     ooctal,  or
  83.          \ooctal.
  84.  
  85.      bit pattern A bit pattern (binary) sequence consists of one  to
  86.          eight    binary digit characters (01). To ensure     bit
  87.          interpretation use 0bbit pattern,  bbit pattern  or
  88.          \bbit pattern.
  89.  
  90.      ISO/ECMA code
  91.          A  ISO/ECMA code sequence consists of    one  or     two
  92.          decimal digit characters, a slash, and one  or     two
  93.          decimal digit characters.
  94.  
  95.      name     An official ASCII or slang name.
  96.  
  97.      The  slang names recognized and printed out are from  a  rather
  98.      comprehensive list that first appeared on USENET in early    1990
  99.      and  has  been continuously updated since. Mnemonics recognized
  100.      and  printed include the official ASCII set, some official     ISO
  101.      names  (where  those differ) and a few common-use    alternatives
  102.      (such  as    NL for LF). HTML/SGML entity names are also  printed
  103.      when  applicable.    All  comparisons are  case-insensitive,     and
  104.      dashes are mapped to spaces. Any unrecognized arguments or     out
  105.      of     range values are silently ignored. Note that the -s  option
  106.      will  not    recognize  'long' names, as it cannot  differentiate
  107.      them from other parts of the string.
  108.  
  109.      For  correct  results, be careful to stringize or    quote  shell
  110.      metacharacters in arguments (especially backslash).
  111.  
  112.      This  utility  is    particularly handy for interpreting  cc(1)'s
  113.      ugly   octal  `invalid-character'    messages,  or  when   coding
  114.      anything to do with serial communications. As a side effect  it
  115.      serves as a handy base-converter for random 8-bit values.
  116.  
  117. AUTHOR
  118.      Eric  S.  Raymond <esr@snark.thyrsus.com> November     1990  (home
  119.      page at http://www.tuxedo.org/~esr/home.html). Reproduce,    use,
  120.      and  modify  as  you  like as long as  you     don't    remove    this
  121.      authorship     notice.  Ioannis E. Tambouras    <ioannis@debian.org>
  122.      added command options and minor enhancements. Brian J. Ginsbach
  123.      <ginsbach@sgi.com>     fixed several bugs  and  expanded  the     man
  124.      page.  David  N. Welton <davidw@efn.org> added the     -s  option.
  125.      Matej  Vela  corrected the ISO names. Dave Capella     contributed
  126.      the idea of listing HTML/SGML entities.
  127.  
  128.  
  129. Open Source
  130.