home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: Multimed / Multimed.zip / chord3_6.zip / chord / recode.info (.txt) < prev    next >
GNU Info File  |  1994-11-06  |  75KB  |  1,461 lines

  1. This is Info file recode.info, produced by Makeinfo-1.55 from the input
  2. file recode.texi.
  3. START-INFO-DIR-ENTRY
  4. * recode: (recode).     Conversion between character sets and usages.
  5. END-INFO-DIR-ENTRY
  6.    This file documents the `recode' command, which has the purpose of
  7. converting files between various character sets and usages.
  8.    Copyright (C) 1990, 1993, 1994 Free Software Foundation, Inc.
  9.    Permission is granted to make and distribute verbatim copies of this
  10. manual provided the copyright notice and this permission notice are
  11. preserved on all copies.
  12.    Permission is granted to copy and distribute modified versions of
  13. this manual under the conditions for verbatim copying, provided that
  14. the entire resulting derived work is distributed under the terms of a
  15. permission notice identical to this one.
  16.    Permission is granted to copy and distribute translations of this
  17. manual into another language, under the above conditions for modified
  18. versions, except that this permission notice may be stated in a
  19. translation approved by the Foundation.
  20. File: recode.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
  21. GNU `recode'
  22. ************
  23.    `recode' converts files between character sets and usages.  When
  24. exact transliterations are not possible, it may get rid of the offending
  25. characters or fall back on approximations.  This program recognizes or
  26. produces nearly 150 different character sets and is able to
  27. transliterate files between almost any pair.  Most RFC 1345 character
  28. sets are supported.
  29.    The current `recode' release is 3.4.
  30. * Menu:
  31. * Introduction::        What is the purpose of this program
  32. * Invoking recode::     How to use this program
  33. * Reversibility::       Reversibility issues
  34. * RFC 1345 charsets::   Charsets from RFC 1345
  35. * ISO charsets::        Charsets based on ASCII
  36. * IBM charsets::        Charsets based on IBM
  37. * CDC charsets::        Charsets based on CDC
  38. * Micro charsets::      Non-IBM micro-computer charsets
  39. * Other charsets::      Some other charsets
  40. * Internals::           Internal aspects
  41.  -- The Detailed Node Listing --
  42. What is the purpose of this program
  43. * Overview::            Overview of charsets
  44. * Contributing::        Contributions and bug reports
  45. Charsets based on ASCII
  46. * ASCII::               Usual ASCII
  47. * ISO 8859-1 charset::  ASCII extended by Latin Alphabets
  48. * ASCII-BS::            ASCII 7-bits, BS to overstrike
  49. * flat::                ASCII without diacritics nor underline
  50. Charsets based on IBM
  51. * EBCDIC::              EBCDIC codes
  52. * IBM-PC::              IBM's PC code
  53. * Icon-QNX::            Unisys' ICON code
  54. Charsets based on CDC
  55. * Display Code::        Control Data's Display Code
  56. * CDC-NOS::             ASCII 6/12 from NOS
  57. * Bang-Bang::           ASCII "bang bang"
  58. Non-IBM micro-computer charsets
  59. * Apple-Mac::           Apple's Macintosh code
  60. * AtariST::             Atari ST code
  61. * NeXT::                NeXT international code
  62. Some other charsets
  63. * LaTeX::               ASCII with LaTeX codes
  64. * Texte::               ASCII with easy French conventions
  65. * HTML::                World Wide Web representations
  66. ASCII with easy French conventions
  67. * Diacritics::          Diacritics
  68. * Ending diaeresis::    List of words ending with diaeresis
  69. Internal aspects
  70. * Main flow::           Overall organization
  71. * New charsets::        Adding new charsets
  72. File: recode.info,  Node: Introduction,  Next: Invoking recode,  Prev: Top,  Up: Top
  73. What is the purpose of this program
  74. ***********************************
  75.    This `recode' program has the purpose of converting files between
  76. various character sets and usages.  When exact transliterations are not
  77. possible, as it is often the case, the program may get rid of the
  78. offending characters or fall back on approximations.
  79.    Let us coin the term "charset" to represent, without distinction, a
  80. character set "per se" or a particular usage of a character set.  This
  81. program recognizes or produces around 150 such charsets.  Since it can
  82. convert each charset to almost any other one, many thousands of
  83. different conversions are possible.
  84.    This tool pays special attention to superimposition of diacritics for
  85. French representation.  This orientation is mostly historical, it does
  86. not impair the usefulness, generality or extensibility of the program.
  87. * Menu:
  88. * Overview::            Overview of charsets
  89. * Contributing::        Contributions and bug reports
  90. File: recode.info,  Node: Overview,  Next: Contributing,  Prev: Introduction,  Up: Introduction
  91. Overview of charsets
  92. ====================
  93.    Recoding is currently possible between most of the charsets
  94. described in RFC 1345.  *Note RFC 1345 charsets::.
  95.    Recode also handles some charsets in more specialized ways.  These
  96.    * usual 7-bit ASCII: without any diacritics, or else: using
  97.      backspace for overstriking; Unisys' ICON convention; TeX/LaTeX
  98.      coding; easy French conventions for electronic mail;
  99.    * 8-bit extensions to ASCII: ISO Latin-1, Atari ST code, IBM's code
  100.      for the PC, Apple's code for the Macintosh, NeXT code;
  101.    * 6-bit escaped ASCII based on CDC display code: 6/12 code from NOS;
  102.      bang-bang code from Universit'e de Montr'eal;
  103.    * non-ASCII codes: three flavors of EBCDIC.
  104.    The recent introduction of RFC 1345 in GNU `recode' has brought with
  105. it a few charsets having the functionality of older ones, but yet being
  106. different in subtle ways.  The effects have not been fully investigated
  107. yet, so for now, clashes are avoided, the old and new charsets are kept
  108. well separate.  For example, wizards would be interested in comparing
  109. the output of these two commands:
  110.      recode -vh IBM-PC:Apple-Mac
  111.      recode -vh IBM437:macintosh
  112. The first command uses only charsets prior to RFC 1345 introduction.
  113. Both methods give different recodings, the first also properly recodes
  114. end of lines.  These differences are annoying, the fuzziness will have
  115. to be explained and settle down one day.
  116. File: recode.info,  Node: Contributing,  Prev: Overview,  Up: Introduction
  117. Contributions and bug reports
  118. =============================
  119.    Even being the `recode' author and current maintainer, I am no
  120. specialist in charset standards.  I only made `recode' along the years
  121. to solve my own needs, but felt it was applicable for the needs of
  122. others.  Some GNU people liked the program structure and suggested to
  123. make it more widely available.  I rely on GNU users judgment for what
  124. is best to be done next.
  125.    Properly protecting GNU `recode' about possible copyright fights is
  126. a pain for me and for contributors, but we cannot avoid addressing the
  127. issue in the long run.  Besides, the Free Software Foundation, which
  128. mandates the GNU project, is very sensible to this matter.  GNU
  129. standards require that I be cautious before looking at copyrighted code.
  130. The safest and simplest way for me is to gather ideas and reprogram them
  131. anew, even if this might slow me down considerably.  For contributions
  132. going beyond a few lines of code here and there, the FSF definitely
  133. requires employer disclaimers and copyright assignments in writing.
  134.    Many users contributed to GNU `recode' already, I am grateful to
  135. them for their interest and involvement.  Some suggestions can be
  136. integrated quickly while some others have to be delayed, I have to draw
  137. a line somewhere when time comes to make a new release, about what would
  138. go in it and what would go in the next.  Also, when you contribute
  139. something to `recode', *please* explain what it is about.  Do not take
  140. for granted that I know those charsets which are familiar to you.  Your
  141. explanations could well find their way into this documentation, too.
  142.    Mail suggestions, documentation errors and bug reports to
  143. `bug-gnu-utils@prep.ai.mit.edu' or, if you prefer, directly to Francois
  144. Pinard `pinard@iro.umontreal.ca'.  Do not be afraid to report details,
  145. because this program is the mere aggregation of hundreds of details.
  146. File: recode.info,  Node: Invoking recode,  Next: Reversibility,  Prev: Introduction,  Up: Top
  147. How to use this program
  148. ***********************
  149.    The general format of the program call is one of:
  150.      recode [OPTION]... [CHARSET]
  151.      recode [OPTION]... [BEFORE]:[AFTER] [FILE]...
  152.    The second form is the common case.  Each FILE will be read assuming
  153. it is coded with charset BEFORE, it will be recoded over itself so to
  154. use the charset AFTER.  If there is no such FILE, the program rather
  155. acts as a filter and recode standard input to standard output.
  156.    The available options are:
  157. `--copyright'
  158.      Given this option, all other parameters and options are ignored.
  159.      The program prints briefly the Copyright and copying conditions.
  160.      See the file `COPYING' in the distribution for full statement of
  161.      the Copyright and copying conditions.
  162. `--auto-check'
  163.      In this special mode, `recode' diagnostics itself by analyzing
  164.      connectivity of the various charsets and reporting on standard
  165.      output.  No file will be recoded.
  166.      There might be one non-option argument, in which case it is
  167.      interpreted as a charset name, possibly abbreviated to any non
  168.      ambiguous prefix.  `recode' will then study all recodings having
  169.      the given charset as a starting or ending point.  If there is no
  170.      such non-option argument, `recode' will study *all* possible
  171.      recodings.
  172.      For each possible pair of different charsets, it prints on standard
  173.      output how many single steps are needed for achieving the recoding
  174.      and how many can be saved by step merging.  If a recoding cannot
  175.      be done, the word `UNACHIEVABLE' is printed instead.  However,
  176.      this special line is completely suppressed if option `-x'
  177.      specified some charset to ignore.
  178.      The option `-hNAME' affects the resulting output, because there
  179.      are more merging rules when this option is in effect.  Other
  180.      options affect the result: `-d', `-g' and, notably, `-s'.
  181.      There was a time, in GNU `recode' development, when this option was
  182.      reasonably interesting.  With the greater number of handled
  183.      charsets, it became inordinately slow, taking on the order of one
  184.      hour of wall clock time, while generating a great deal of output.
  185.      This option is not practical anymore when used without a charset
  186.      parameter.  However, it can be made slightly more usable, together
  187.      with option `-x.', which effectively disables most RFC 1345
  188.      charsets from the report.
  189. `--colons'
  190.      With `Texte' Easy French conventions, use the column `:' instead
  191.      of the double-quote `"' for marking diaeresis.  *Note Texte::.
  192. `--diacritics'
  193.      While converting to or from one of `HTML' or `LaTeX' charset,
  194.      limit conversion to diacritics only.  This is particularly useful
  195.      when people write what would be valid `HTML', TeX or LaTeX files,
  196.      if only they were using provided sequences for applying diacritics
  197.      instead of using the diacriticized characters directly from the
  198.      underlying character set.
  199.      While converting to `HTML' or `LaTeX' charset, this option assumes
  200.      that non-diacriticized special characters are properly coded or
  201.      protected, so `recode' will transmit them literally.  While
  202.      converting the other way, this option prevents all attempts at
  203.      recognizing coded or protected versions of non-diacriticized
  204.      special characters of the other charset.  *Note HTML::.  *Note
  205.      LaTeX::.
  206. `--force'
  207.      It is planned that some future version of `recode' will protect
  208.      you against recoding a file irreversibly over itself.  However,
  209.      please keep vividly in mind that this protection is not yet active
  210.      in `recode'.  When the protection will be enforced, option `-f'
  211.      will become mandatory for a file to be replaced by some recoding
  212.      of its contents, if such conversion is loosing information.  For
  213.      now, `recode' acts as if option `-f' was always selected.
  214.      In preparation for the time this option will become mandatory, you
  215.      may start using `-f' right away in scripts calling `recode', when
  216.      you know this is the reasonnable thing to do.
  217. `--graphics'
  218.      This option is only meaningful while getting *out* of the `IBM-PC'
  219.      charset.  In this charset, characters 176 to 223 are used for
  220.      constructing rulers and boxes, using simple or double horizontal or
  221.      vertical lines.  This option forces the automatic selection of
  222.      ASCII characters for approximating these rulers and boxes, at cost
  223.      of making the transformation irreversible.  Option `-g' implies
  224.      `-f'.
  225. `-h[NAME]'
  226. `--header[=NAME]'
  227.      Instead of recoding files, `recode' writes a C source file on
  228.      standard output and exits.  This source is meant to be included in
  229.      a regular C program: its purpose is to declare and initialize an
  230.      array, named NAME, which represents the requested recoding.  If
  231.      NAME is not specified, then it defaults to `BEFORE_to_AFTER',
  232.      where BEFORE is the starting charset and AFTER is the goal charset.
  233.      Even if `recode' tries its best, this option does not always
  234.      succeed in producing the requested C table.  It will however,
  235.      provided the recoding can be internally represented by only one
  236.      step after the optimization phase, and if this merged step conveys
  237.      a one-to-one or a one-to-many explicit table.  But this is all
  238.      fairly technical.  Better try and see!
  239.      Beware that other options might affect the produced C tables,
  240.      these are: `-d', `-g' and, particularly, `-s'.
  241. `--sequence=files'
  242.      When the recoding requires a combination of two or more elementary
  243.      recoding steps, this option forces many passes over the data, using
  244.      intermediate files between passes.  This is the default behavior
  245.      when files are recoded over themselves.  If this option is
  246.      selected in filter mode, that is, when the program reads standard
  247.      input and writes standard output, it might take longer for
  248.      programs further down the pipe chain to start receiving some
  249.      recoded data.
  250. `-l[FORMAT]'
  251. `--list[=FORMAT]'
  252.      This option asks for information about all charsets, or about one
  253.      particular charset.  No file will be recoded.
  254.      If there is no non-option arguments, `recode' ignores the FORMAT
  255.      value of the option, it writes a sorted list of charset names on
  256.      standard output, one per line.  When a charset name have aliases
  257.      or synonyms, they follow the true charset name on its line,
  258.      presented in lexicographical order from left to right.  This list
  259.      is over one hundred lines.  It is best used with `grep', as in:
  260.           recode -l | grep greek
  261.      There might be one non-option argument, in which case it is
  262.      interpreted as a charset name, possibly abbreviated to any non
  263.      ambiguous prefix.  This particular usage of the `-l' option is
  264.      obeyed *only* for charsets having an RFC 1345 style internal
  265.      description.  Even if most charsets have this property, some do
  266.      not, then option `-l' cannot be used to detail these particular
  267.      charsets.  For knowing if a particular charset can be listed this
  268.      way, you should merely try and see if this works.  The FORMAT
  269.      value of the option is a keyword from the following list.
  270.      Keywords may be abbreviated by dropping suffix letters, and even
  271.      reduced to the first letter only:
  272.     `decimal'
  273.           This format asks for the production on standard output of a
  274.           concise tabular display of the charset, in which character
  275.           code values are expressed in decimal.
  276.     `octal'
  277.           This format uses octal instead of decimal in the concise
  278.           tabular display of the charset.
  279.     `hexadecimal'
  280.           This format uses hexadecimal instead of decimal in the
  281.           concise tabular display of the charset.
  282.     `full'
  283.           This format requests an extensive display of the charset on
  284.           standard output, using one line per character showing its
  285.           decimal, hexadecimal and octal code values, and also a
  286.           descriptive comment which is indeed the 10646 character name.
  287.      When option `-l' is used together with a CHARSET argument, the
  288.      FORMAT defaults to `decimal'.
  289. `--sequence=popen'
  290.      When the recoding requires a combination of two or more elementary
  291.      recoding steps, this option forces the creation of a chain of
  292.      program instances initiated through the `popen(3)' library call,
  293.      all operating in parallel.  In filter mode, costing the overhead
  294.      of multiple program initializations, recoded data will be
  295.      available soon after the program starts, even if many elementary
  296.      recoding steps are required.
  297.      If, at installation time, the `popen(3)' call is said to be
  298.      unavailable, selecting option `-o' is equivalent to selecting
  299.      option `-i'.
  300. `--sequence=pipe'
  301.      When the recoding requires a combination of two or more elementary
  302.      recoding steps, this option forces the program to fork itself into
  303.      a few copies interconnected with pipes, using the `pipe(2)' system
  304.      call.  All copies of the program operate in parallel.  This method
  305.      is similar to the method used through option `-o', but is more
  306.      efficient because the program initializes only once.  This is the
  307.      default behavior in filter mode.  If this option is used when
  308.      files are recoded over themselves, this should also save disk
  309.      space because some temporary files might not be needed, at cost of
  310.      more system overhead.
  311.      If, at installation time, the `pipe(2)' call is said to be
  312.      unavailable, selecting option `-p' is equivalent to selecting
  313.      option `-o'.  If both `pipe(2)' and `popen(3)' are unavailable,
  314.      selecting option `-p' is equivalent to selecting option `-i'.
  315. `--quiet'
  316. `--silent'
  317.      This option has the sole purpose of inhibiting diagnostic messages
  318.      about irreversible recodings.
  319.      This option is set automatically for the children processes, when
  320.      recode splits itself in many collaborating copies.  Doing so, the
  321.      diagnostic is issued only once by the parent.  See options `-o'
  322.      and `-p'.
  323. `--strict'
  324.      By using this option, the user requests that `recode' be very
  325.      strict while recoding a file, merely loosing in the transformation
  326.      any character which is not explicitly mapped from a charset to
  327.      another.  This option renders the recoding less likely reversible,
  328.      so it also implies option `-f'.  Also *Note Reversibility::.
  329. `--touch'
  330.      The *touch* option is meaningful only when files are recoded over
  331.      themselves.  Without it, the time-stamps associated with files are
  332.      preserved, to reflect the fact that changing the code of a file
  333.      does not really alter its informational contents.  When the user
  334.      wants the recoded files to be time-stamped at the recoding time,
  335.      this option inhibits the automatic protection of the time-stamps.
  336. `--verbose'
  337.      Before doing any recoding, the program will first print on `stderr'
  338.      the list of all intermediate charsets planned for recoding,
  339.      starting with the BEFORE charset and ending with the AFTER charset.
  340.      It also prints an indication of the recoding quality, as one of
  341.      the word `reversible', `one to one', `one to many', `many to one'
  342.      or `many to many'.
  343.      This information will appear once or twice.  It is shown a second
  344.      time only when the optimization and step merging phase succeeds in
  345.      creating a new single step.
  346.      This option also has a second effect.  The program will print on
  347.      `stderr' one message per FILE recoded, so to let the user informed
  348.      of the progress of its command.
  349.      An easy way to know beforehand the sequence or quality of a
  350.      recoding is by using the command such as:
  351.           recode -v BEFORE:AFTER < /dev/null
  352.      using the fact that, *so far* in `recode', an empty input file
  353.      produces an empty output file.
  354. `-x=CHARSET'
  355. `--ignore=CHARSET'
  356.      This option tells the program to ignore any recoding path through
  357.      the specified CHARSET, so disabling any single step using this
  358.      charset as a start or end point.  This may be used when the user
  359.      wants to force `recode' in using an alternate recoding path.
  360.      CHARSET may be abbreviated to any unambiguous prefix.  For
  361.      convenience, the value `.' is an alias for `RFC 1345', so the
  362.      option `-x.' effectively disables *all* RFC 1345 tables at once.
  363. `--help'
  364.      The program merely prints a page of help on standard output, and
  365.      exits without doing any recoding.
  366. `--version'
  367.      The program merely prints its version numbers on standard output,
  368.      and exits without doing anything else.
  369.    The BEFORE:AFTER argument specifies the start charset and the goal
  370. charset.  The allowable values for BEFORE or AFTER are described in the
  371. remainder of this document.  Charsets may have predefined alternate
  372. names, or aliases, which are equally acceptable.
  373.    In the BEFORE:AFTER argument only, a backslash may be used to quote
  374. the next character of a charset name.  This might be useful for
  375. preventing a colon to be mistakenly interpreted as the separator between
  376. BEFORE and AFTER.  Rather, the colon could be omitted, because while
  377. recognizing a charset name or alias, GNU `recode' ignores all
  378. characters besides letters and digits.  There is also no distinction
  379. between upper and lower case.  Charset names or aliases may always be
  380. abbreviated to any unambiguous prefix.
  381.    One or both of the BEFORE or AFTER keywords may be omitted, but the
  382. colon which separates them cannot.  An omitted keyword implies the
  383. usual or default code in usage on the system where this program is
  384. installed.  Usually, this default code is `Latin-1' for UNIX systems or
  385. `IBM-PC' for MS-DOS machines.
  386. File: recode.info,  Node: Reversibility,  Next: RFC 1345 charsets,  Prev: Invoking recode,  Up: Top
  387. Reversibility issues
  388. ********************
  389.    Even if GNU `recode' tries hard at keeping the recodings reversible,
  390. you should not develop an unconditional confidence in its ability to do
  391. so.  You *ought* to keep only reasonable expectations about reverse
  392. recodings.  In particular, consider:
  393.    * Most transformations are fully reversible for all inputs, but
  394.      loose this property whenever `-s' is specified.
  395.    * A few transformations are not meant to be reversible, by design.
  396.    * Reversibility sometimes depends on actual file contents and cannot
  397.      be ascertained beforehand, without reading the file.
  398.    * Reversibility is never absolute across successive versions of this
  399.      program.  Even correcting a small bug in a mapping could induce
  400.      slight discrepancies later.
  401.    * Reversibility is easily lost by merging.  This is best explained
  402.      through an example.  If you reversibly recode a file from charset
  403.      `A' to charset `B', then you reversibly recode the result from
  404.      charset `B' to charset `C', you cannot expect to recover the
  405.      original file by merely recoding from charset `C' directly to
  406.      charset `A'.  You will instead have to recode from charset `C'
  407.      back to charset `B', and only then from charset `B' to charset `A'.
  408.    * Faulty files create a particular problem.  Consider an example,
  409.      recoding from `IBM-PC' to `Latin-1'.  End of lines are represented
  410.      as `\r\n' in `IBM-PC' and as `\n' in `Latin-1'.  There is no way
  411.      by which a faulty `IBM-PC' file containing a `\n' not preceded by
  412.      `\r' be translated into a `Latin-1' file, and then back.
  413.    * There is another difficulty arising from code equivalences.  For
  414.      example, in a `LaTeX' charset file, the string `\^\i{}' could be
  415.      recoded back and forth through another charset and become
  416.      `\^{\i}'.  Even if the resulting file is equivalent to the
  417.      original one, it is not identical.
  418.    Unless option `-s' is used, `recode' automatically tries to fill
  419. mappings with invented correspondences, often making them fully
  420. reversible.  This filling is not made at random.  The algorithm tries to
  421. stick to the identity mapping and, when this is not possible, it prefers
  422. generating many small permutation cycles, each involving only a few
  423. codes.
  424.    For example, here is how IBM-PC code 186 gets translated to control-U
  425. in Latin-1.  Control-U is 21.  Code 21 is the IBM-PC section sign,
  426. which is 167 in Latin-1.  `recode' cannot reciprocate 167 to 21,
  427. because 167 is the masculine ordinal indicator on IBM PC's, which is
  428. 186 in Latin-1.  Code 186 in IBM PC's has no Latin-1 equivalent; by
  429. assigning back to 21, `recode' closes this short permutation loop.
  430.    As a consequence of this map filling, `recode' may sometimes produce
  431. *funny* characters.  They may look annoying, they are nevertheless
  432. helpful when one changes his/her mind and wants to revert to the prior
  433. recoding.  If you cannot stand these, use option `-s', which asks for a
  434. very strict recoding.
  435.    This map filling sometimes has another surprising consequence.  In
  436. some cases, `recode' seems to copy a file without recoding it.  But in
  437. fact, it does.  As an illuminating example, consider you requested:
  438.      recode l1:us < File-Latin1 > File-ASCII
  439.      cmp File-Latin1 File-ASCII
  440. then `cmp' will not report any difference.  This is quite normal.
  441. Latin-1 gets correctly recoded to ASCII for charsets commonalities
  442. (which are the first 128 characters, in this case).  The remaining last
  443. 128 Latin-1 characters have no ASCII correspondent.  Instead of loosing
  444. them, recode elects to map them to unspecified characters of ASCII, so
  445. making the recoding reversible.  The simplest way of achieving this is
  446. merely to keep those last 128 characters unchanged.  The overall effect
  447. is copying the file verbatim.
  448.    If you feel this behavior is too generous and if you do not wish to
  449. care about reversibility, simply use option `-s'.  By doing so,
  450. `recode' will strictly map only those Latin-1 characters which have an
  451. ASCII equivalent, and will merely drop those which do not.  Then, there
  452. is more chance that you will observe a difference between the input and
  453. the output file.
  454. File: recode.info,  Node: RFC 1345 charsets,  Next: ISO charsets,  Prev: Reversibility,  Up: Top
  455. Charsets from RFC 1345
  456. **********************
  457.    In the GNU `recode' distribution, there is a copy of RFC 1345:
  458.      "Character Mnemonics & Character Sets", K. Simonsen, Request for
  459.      Comments no. 1345, Network Working Group, June 1992.
  460.    This document is also available by anonymous ftp at `nic.ddn.mil' in
  461. directory `rfc' as file `rfc1345.txt'.  This report defines many
  462. character mnemonics and character sets.
  463.    GNU `recode' implements most of RFC 1345, however:
  464.   1. It does not recognize 16-bits charsets: `GB_2312-80',
  465.      `JIS_C6226-1978', `JIS_C6226-1983', `JIS_X0212-1990' and
  466.      `KS_C_5601-1987'.
  467.   2. It does not recognize those charsets which combine two characters
  468.      for representing a third: `ANSI_X3.110-1983', `ISO_6937-2-add',
  469.      `T.101-G2', `T.61-8bit', `iso-ir-90' and `videotex-suppl'.
  470.   3. It interprets the charset `isoir91' as `NATS-DANO' (alias
  471.      `iso-ir-9-1'), *not* as `JIS_C6229-1984-a' (alias `iso-ir-91').
  472.      So better avoid using these two alias names.
  473.   4. It interprets the charset `isoir92' as `NATS-DANO-ADD' (alias
  474.      `iso-ir-9-2'), *not* as `JIS_C6229-1984-b' (alias `iso-ir-92').
  475.      So better avoid using these two alias names.
  476.   5. It ignores all about code overloading, but still processes
  477.      correctly the remainder of `dk-us' and `us-dk'.
  478.    Keld Simonsen `keld@dkuug.dk' did most of RFC 1345 himself, with
  479. some funding from Danish Standards and Nordic standards (INSTA) project.
  480. He also did the character set design work, with substantial input from
  481. Olle Jaernefors.  Keld typed in almost all of the tables, some have been
  482. contributed.  A number of people have checked the tables in various
  483. ways.  The RFC lists a number of people who helped.
  484.    Internally, RFC 1345 associates which each character an unambiguous
  485. mnemonic of (usually) one or two characters, taken from ISO 646, a
  486. minimal set of 83 characters.  The charset made up by these mnemonics is
  487. available in `recode' under the name `RFC 1345', with `.' being
  488. accepted as a short alias.
  489.    Even if the mnemonics are unambiguous taken separately, strings made
  490. up by concatenating these mnemonics are ambiguous and cannot be safely
  491. interpreted.  So `recode' only allows converting *to* RFC 1345, never
  492. from it.  However, special machinery in the program allows for
  493. converting *through* RFC 1345, when RFC 1345 is neither the initial nor
  494. the final charset of the conversion sequence.
  495.    Recoding directly to `.' has the main goal of letting the user
  496. examine foreign charsets.  We cannot do much, mechanically, with the
  497. result.  For increased readability, as a matter of convenience, `SP' is
  498. left as a single space and `LF' becomes a newline.
  499. `ANSI_X3.4-1968'
  500.      `ANSI_X3.4-1986', `ASCII', `IBM367', `ISO646-US',
  501.      `ISO_646.irv:1991', `US-ASCII', `cp367', `iso-ir-6' and `us' are
  502.      aliases for this charset.  source: ECMA registry
  503. `ASMO_449'
  504.      `ISO_9036', `arabic7' and `iso-ir-89' are aliases for this charset.
  505.      source: ECMA registry
  506. `BS_4730'
  507.      `ISO646-GB', `gb', `iso-ir-4' and `uk' are aliases for this
  508.      charset.  source: ECMA registry
  509. `BS_viewdata'
  510.      `iso-ir-47' is an alias for this charset.  source: ECMA registry
  511. `CSA_Z243.4-1985-1'
  512.      `ISO646-CA', `ca', `csa7-1' and `iso-ir-121' are aliases for this
  513.      charset.  source: ECMA registry
  514. `CSA_Z243.4-1985-2'
  515.      `ISO646-CA2', `csa7-2' and `iso-ir-122' are aliases for this
  516.      charset.  source: ECMA registry
  517. `CSA_Z243.4-1985-gr'
  518.      `iso-ir-123' is an alias for this charset.  source: ECMA registry
  519. `CSN_369103'
  520.      `iso-ir-139' is an alias for this charset.  source: ECMA registry
  521. `DEC-MCS'
  522.      `dec' is an alias for this charset.  VAX/VMS User's Manual, Order
  523.      Number: AI-Y517A-TE, April 1986.
  524. `DIN_66003'
  525.      `ISO646-DE', `de' and `iso-ir-21' are aliases for this charset.
  526.      source: ECMA registry
  527. `DS_2089'
  528.      `DS2089', `ISO646-DK' and `dk' are aliases for this charset.
  529.      source: Danish Standard, DS 2089, February 1974
  530. `EBCDIC-AT-DE'
  531.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  532. `EBCDIC-AT-DE-A'
  533.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  534. `EBCDIC-CA-FR'
  535.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  536. `EBCDIC-DK-NO'
  537.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  538. `EBCDIC-DK-NO-A'
  539.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  540. `EBCDIC-ES'
  541.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  542. `EBCDIC-ES-A'
  543.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  544. `EBCDIC-ES-S'
  545.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  546. `EBCDIC-FI-SE'
  547.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  548. `EBCDIC-FI-SE-A'
  549.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  550. `EBCDIC-FR'
  551.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  552. `EBCDIC-IT'
  553.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  554. `EBCDIC-PT'
  555.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  556. `EBCDIC-UK'
  557.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  558. `EBCDIC-US'
  559.      source: IBM 3270 Char Set Ref Ch 10, GA27-2837-9, April 1987
  560. `ECMA-cyrillic'
  561.      `iso-ir-111' is an alias for this charset.  source: ECMA registry
  562.      `ISO646-ES' and `iso-ir-17' are aliases for this charset.  source:
  563.      ECMA registry
  564. `ES2'
  565.      `ISO646-ES2' and `iso-ir-85' are aliases for this charset.
  566.      source: ECMA registry
  567. `GB_1988-80'
  568.      `ISO646-CN', `cn' and `iso-ir-57' are aliases for this charset.
  569.      source: ECMA registry
  570. `GOST_19768-74'
  571.      `ST_SEV_358-88' and `iso-ir-153' are aliases for this charset.
  572.      source: ECMA registry
  573. `IBM037'
  574.      `cp037', `ebcdic-cp-ca', `ebcdic-cp-nl', `ebcdic-cp-us' and
  575.      `ebcdic-cp-wt' are aliases for this charset.  source: IBM NLS RM
  576.      Vol2 SE09-8002-01, March 1990
  577. `IBM038'
  578.      `EBCDIC-INT' and `cp038' are aliases for this charset.  source:
  579.      IBM 3174 Character Set Ref, GA27-3831-02, March 1990
  580. `IBM1026'
  581.      `CP1026' is an alias for this charset.  source: IBM NLS RM Vol2
  582.      SE09-8002-01, March 1990
  583. `IBM273'
  584.      `CP273' is an alias for this charset.  source: IBM NLS RM Vol2
  585.      SE09-8002-01, March 1990
  586. `IBM274'
  587.      `CP274' and `EBCDIC-BE' are aliases for this charset.  source: IBM
  588.      3174 Character Set Ref, GA27-3831-02, March 1990
  589. `IBM275'
  590.      `EBCDIC-BR' and `cp275' are aliases for this charset.  source: IBM
  591.      NLS RM Vol2 SE09-8002-01, March 1990
  592. `IBM277'
  593.      `EBCDIC-CP-DK' and `EBCDIC-CP-NO' are aliases for this charset.
  594.      source: IBM NLS RM Vol2 SE09-8002-01, March 1990
  595. `IBM278'
  596.      `CP278', `ebcdic-cp-fi' and `ebcdic-cp-se' are aliases for this
  597.      charset.  source: IBM NLS RM Vol2 SE09-8002-01, March 1990
  598. `IBM280'
  599.      `CP280' and `ebcdic-cp-it' are aliases for this charset.  source:
  600.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  601. `IBM281'
  602.      `EBCDIC-JP-E' and `cp281' are aliases for this charset.  source:
  603.      IBM 3174 Character Set Ref, GA27-3831-02, March 1990
  604. `IBM284'
  605.      `CP284' and `ebcdic-cp-es' are aliases for this charset.  source:
  606.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  607. `IBM285'
  608.      `CP285' and `ebcdic-cp-gb' are aliases for this charset.  source:
  609.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  610. `IBM290'
  611.      `EBCDIC-JP-kana' and `cp290' are aliases for this charset.
  612.      source: IBM 3174 Character Set Ref, GA27-3831-02, March 1990
  613. `IBM297'
  614.      `cp297' and `ebcdic-cp-fr' are aliases for this charset.  source:
  615.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  616. `IBM420'
  617.      `cp420' and `ebcdic-cp-ar1' are aliases for this charset.  source:
  618.      IBM NLS RM Vol2 SE09-8002-01, March 1990 IBM NLS RM p 11-11
  619. `IBM423'
  620.      `cp423' and `ebcdic-cp-gr' are aliases for this charset.  source:
  621.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  622. `IBM424'
  623.      `cp424' and `ebcdic-cp-he' are aliases for this charset.  source:
  624.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  625. `IBM437'
  626.      `437' and `cp437' are aliases for this charset.  source: IBM NLS
  627.      RM Vol2 SE09-8002-01, March 1990
  628. `IBM500'
  629.      `CP500', `ebcdic-cp-be' and `ebcdic-cp-ch' are aliases for this
  630.      charset.  source: IBM NLS RM Vol2 SE09-8002-01, March 1990
  631. `IBM850'
  632.      `850' and `cp850' are aliases for this charset.  source: IBM NLS
  633.      RM Vol2 SE09-8002-01, March 1990
  634. `IBM851'
  635.      `851' and `cp851' are aliases for this charset.  source: IBM NLS
  636.      RM Vol2 SE09-8002-01, March 1990
  637. `IBM852'
  638.      `852' and `cp852' are aliases for this charset.  source: IBM NLS
  639.      RM Vol2 SE09-8002-01, March 1990
  640. `IBM855'
  641.      `855' and `cp855' are aliases for this charset.  source: IBM NLS
  642.      RM Vol2 SE09-8002-01, March 1990
  643. `IBM857'
  644.      `857' and `cp857' are aliases for this charset.  source: IBM NLS
  645.      RM Vol2 SE09-8002-01, March 1990
  646. `IBM860'
  647.      `860' and `cp860' are aliases for this charset.  source: IBM NLS
  648.      RM Vol2 SE09-8002-01, March 1990
  649. `IBM861'
  650.      `861', `cp-is' and `cp861' are aliases for this charset.  source:
  651.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  652. `IBM862'
  653.      `862' and `cp862' are aliases for this charset.  source: IBM NLS
  654.      RM Vol2 SE09-8002-01, March 1990
  655. `IBM863'
  656.      `863' and `cp863' are aliases for this charset.  source: IBM
  657.      Keyboard layouts and code pages, PN 07G4586 June 1991
  658. `IBM864'
  659.      `cp864' is an alias for this charset.  source: IBM Keyboard
  660.      layouts and code pages, PN 07G4586 June 1991
  661. `IBM865'
  662.      `865' and `cp865' are aliases for this charset.  source: IBM DOS
  663.      3.3 Ref (Abridged), 94X9575 (Feb 1987)
  664. `IBM868'
  665.      `CP868' and `cp-ar' are aliases for this charset.  source: IBM NLS
  666.      RM Vol2 SE09-8002-01, March 1990
  667. `IBM869'
  668.      `869', `cp-gr' and `cp869' are aliases for this charset.  source:
  669.      IBM Keyboard layouts and code pages, PN 07G4586 June 1991
  670. `IBM870'
  671.      `CP870', `ebcdic-cp-roece' and `ebcdic-cp-yu' are aliases for this
  672.      charset.  source: IBM NLS RM Vol2 SE09-8002-01, March 1990
  673. `IBM871'
  674.      `CP871' and `ebcdic-cp-is' are aliases for this charset.  source:
  675.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  676. `IBM880'
  677.      `EBCDIC-Cyrillic' and `cp880' are aliases for this charset.
  678.      source: IBM NLS RM Vol2 SE09-8002-01, March 1990
  679. `IBM891'
  680.      `cp891' is an alias for this charset.  source: IBM NLS RM Vol2
  681.      SE09-8002-01, March 1990
  682. `IBM903'
  683.      `cp903' is an alias for this charset.  source: IBM NLS RM Vol2
  684.      SE09-8002-01, March 1990
  685. `IBM904'
  686.      `904' and `cp904' are aliases for this charset.  source: IBM NLS
  687.      RM Vol2 SE09-8002-01, March 1990
  688. `IBM905'
  689.      `CP905' and `ebcdic-cp-tr' are aliases for this charset.  source:
  690.      IBM 3174 Character Set Ref, GA27-3831-02, March 1990
  691. `IBM918'
  692.      `CP918' and `ebcdic-cp-ar2' are aliases for this charset.  source:
  693.      IBM NLS RM Vol2 SE09-8002-01, March 1990
  694. `IEC_P27-1'
  695.      `iso-ir-143' is an alias for this charset.  source: ECMA registry
  696. `INIS'
  697.      `iso-ir-49' is an alias for this charset.  source: ECMA registry
  698. `INIS-8'
  699.      `iso-ir-50' is an alias for this charset.  source: ECMA registry
  700. `INIS-cyrillic'
  701.      `iso-ir-51' is an alias for this charset.  source: ECMA registry
  702. `INVARIANT'
  703. `ISO_10367-box'
  704.      `iso-ir-155' is an alias for this charset.  source: ECMA registry
  705. `ISO_2033-1983'
  706.      `e13b' and `iso-ir-98' are aliases for this charset.  source: ECMA
  707.      registry
  708. `ISO_5427'
  709.      `iso-ir-37' is an alias for this charset.  source: ECMA registry
  710. `ISO_5427:1981'
  711.      `iso-ir-54' is an alias for this charset.  source: ECMA registry
  712. `ISO_5428:1980'
  713.      `iso-ir-55' is an alias for this charset.  source: ECMA registry
  714. `ISO_646.basic:1983'
  715.      `ref' is an alias for this charset.  source: ECMA registry
  716. `ISO_646.irv:1983'
  717.      `irv' and `iso-ir-2' are aliases for this charset.  source: ECMA
  718.      registry
  719. `ISO_6937-2-25'
  720.      `iso-ir-152' is an alias for this charset.  source: ECMA registry
  721. `ISO_8859-1:1987'
  722.      `CP819', `IBM819', `ISO-8859-1', `ISO_8859-1', `iso-ir-100', `l1'
  723.      and `latin1' are aliases for this charset.  source: ECMA registry
  724. `ISO_8859-2:1987'
  725.      `ISO-8859-2', `ISO_8859-2', `iso-ir-101', `l2' and `latin2' are
  726.      aliases for this charset.  source: ECMA registry
  727. `ISO_8859-3:1988'
  728.      `ISO-8859-3', `ISO_8859-3', `iso-ir-109', `l3' and `latin3' are
  729.      aliases for this charset.  source: ECMA registry
  730. `ISO_8859-4:1988'
  731.      `ISO-8859-4', `ISO_8859-4', `iso-ir-110', `l4' and `latin4' are
  732.      aliases for this charset.  source: ECMA registry
  733. `ISO_8859-5:1988'
  734.      `ISO-8859-5', `ISO_8859-5', `cyrillic' and `iso-ir-144' are
  735.      aliases for this charset.  source: ECMA registry
  736. `ISO_8859-6:1987'
  737.      `ASMO-708', `ECMA-114', `ISO-8859-6', `ISO_8859-6', `arabic' and
  738.      `iso-ir-127' are aliases for this charset.  source: ECMA registry
  739. `ISO_8859-7:1987'
  740.      `ECMA-118', `ELOT_928', `ISO-8859-7', `ISO_8859-7', `greek',
  741.      `greek8' and `iso-ir-126' are aliases for this charset.  source:
  742.      ECMA registry
  743. `ISO_8859-8:1988'
  744.      `ISO-8859-8', `ISO_8859-8', `hebrew' and `iso-ir-138' are aliases
  745.      for this charset.  source: ECMA registry
  746. `ISO_8859-9:1989'
  747.      `ISO-8859-9', `ISO_8859-9', `iso-ir-148', `l5' and `latin5' are
  748.      aliases for this charset.  source: ECMA registry
  749. `ISO_8859-supp'
  750.      `iso-ir-154' and `latin1-2-5' are aliases for this charset.
  751.      source: ECMA registry
  752.      `ISO646-IT' and `iso-ir-15' are aliases for this charset.  source:
  753.      ECMA registry
  754. `JIS_C6220-1969-jp'
  755.      `JIS_C6220-1969', `iso-ir-13', `katakana' and `x0201-7' are
  756.      aliases for this charset.  source: ECMA registry
  757. `JIS_C6220-1969-ro'
  758.      `ISO646-JP', `iso-ir-14' and `jp' are aliases for this charset.
  759.      source: ECMA registry
  760. `JIS_C6229-1984-a'
  761.      `jp-ocr-a' is an alias for this charset.  source: ECMA registry
  762. `JIS_C6229-1984-b'
  763.      `ISO646-JP-OCR-B' and `jp-ocr-b' are aliases for this charset.
  764.      source: ECMA registry
  765. `JIS_C6229-1984-b-add'
  766.      `iso-ir-93' and `jp-ocr-b-add' are aliases for this charset.
  767.      source: ECMA registry
  768. `JIS_C6229-1984-hand'
  769.      `iso-ir-94' and `jp-ocr-hand' are aliases for this charset.
  770.      source: ECMA registry
  771. `JIS_C6229-1984-hand-add'
  772.      `iso-ir-95' and `jp-ocr-hand-add' are aliases for this charset.
  773.      source: ECMA registry
  774. `JIS_C6229-1984-kana'
  775.      `iso-ir-96' is an alias for this charset.  source: ECMA registry
  776. `JIS_X0201'
  777.      `X0201' is an alias for this charset.
  778. `JUS_I.B1.002'
  779.      `ISO646-YU', `iso-ir-141', `js' and `yu' are aliases for this
  780.      charset.  source: ECMA registry
  781. `JUS_I.B1.003-mac'
  782.      `iso-ir-147' and `macedonian' are aliases for this charset.
  783.      source: ECMA registry
  784. `JUS_I.B1.003-serb'
  785.      `iso-ir-146' and `serbian' are aliases for this charset.  source:
  786.      ECMA registry
  787. `KSC5636'
  788.      `ISO646-KR' is an alias for this charset.
  789. `Latin-greek-1'
  790.      `iso-ir-27' is an alias for this charset.  source: ECMA registry
  791. `MSZ_7795.3'
  792.      `ISO646-HU', `hu' and `iso-ir-86' are aliases for this charset.
  793.      source: ECMA registry
  794. `NATS-DANO'
  795.      `iso-ir-9-1' is an alias for this charset.  source: ECMA registry
  796. `NATS-DANO-ADD'
  797.      `iso-ir-9-2' is an alias for this charset.  source: ECMA registry
  798. `NATS-SEFI'
  799.      `iso-ir-8-1' is an alias for this charset.  source: ECMA registry
  800. `NATS-SEFI-ADD'
  801.      `iso-ir-8-2' is an alias for this charset.  source: ECMA registry
  802. `NC_NC00-10:81'
  803.      `ISO646-CU', `cuba' and `iso-ir-151' are aliases for this charset.
  804.      source: ECMA registry
  805. `NF_Z_62-010'
  806.      `ISO646-FR', `fr' and `iso-ir-69' are aliases for this charset.
  807.      source: ECMA registry
  808. `NF_Z_62-010_(1973)'
  809.      `ISO646-FR1' and `iso-ir-25' are aliases for this charset.
  810.      source: ECMA registry
  811. `NS_4551-1'
  812.      `ISO646-NO', `iso-ir-60' and `no' are aliases for this charset.
  813.      source: ECMA registry
  814. `NS_4551-2'
  815.      `ISO646-NO2', `iso-ir-61' and `no2' are aliases for this charset.
  816.      source: ECMA registry
  817.      `ISO646-PT' and `iso-ir-16' are aliases for this charset.  source:
  818.      ECMA registry
  819. `PT2'
  820.      `ISO646-PT2' and `iso-ir-84' are aliases for this charset.
  821.      source: ECMA registry
  822. `SEN_850200_B'
  823.      `FI', `ISO646-FI', `ISO646-SE', `iso-ir-10' and `se' are aliases
  824.      for this charset.  source: ECMA registry
  825. `SEN_850200_C'
  826.      `ISO646-SE2', `iso-ir-11' and `se2' are aliases for this charset.
  827.      source: ECMA registry
  828. `T.61-7bit'
  829.      `iso-ir-102' is an alias for this charset.  source: ECMA registry
  830. `dk-us'
  831. `greek-ccitt'
  832.      `iso-ir-150' is an alias for this charset.  source: ECMA registry
  833. `greek7'
  834.      `iso-ir-88' is an alias for this charset.  source: ECMA registry
  835. `greek7-old'
  836.      `iso-ir-18' is an alias for this charset.  source: ECMA registry
  837. `hp-roman8'
  838.      `r8' and `roman8' are aliases for this charset.  source: LaserJet
  839.      IIP Printer User's Manual, HP part no 33471-90901, Hewlet-Packard,
  840.      June 1989.
  841. `latin-greek'
  842.      `iso-ir-19' is an alias for this charset.  source: ECMA registry
  843. `latin-lap'
  844.      `iso-ir-158' and `lap' are aliases for this charset.  source: ECMA
  845.      registry
  846. `latin6'
  847.      `iso-ir-157' and `l6' are aliases for this charset.  source: ECMA
  848.      registry
  849. `macintosh'
  850.      `mac' is an alias for this charset.  source: The Unicode Standard
  851.      ver1.0, ISBN 0-201-56788-1, Oct 1991
  852. `us-dk'
  853.      for compatibility with ASCII
  854. File: recode.info,  Node: ISO charsets,  Next: IBM charsets,  Prev: RFC 1345 charsets,  Up: Top
  855. Charsets based on ASCII
  856. ***********************
  857. * Menu:
  858. * ASCII::               Usual ASCII
  859. * ISO 8859-1 charset::  ASCII extended by Latin Alphabets
  860. * ASCII-BS::            ASCII 7-bits, BS to overstrike
  861. * flat::                ASCII without diacritics nor underline
  862. File: recode.info,  Node: ASCII,  Next: ISO 8859-1 charset,  Prev: ISO charsets,  Up: ISO charsets
  863. Usual ASCII
  864. ===========
  865.    This charset is available in `recode' under the name `ASCII'.  In
  866. fact, it's true name is `ANSI_X3.4-1968' as per RFC 1345, accepted
  867. aliases being `ANSI_X3.4-1986', `ASCII', `IBM367', `ISO646-US',
  868. `ISO_646.irv:1991', `US-ASCII', `cp367', `iso-ir-6' and `us'.  The
  869. shortest way of specifying it in `recode' is `us'.
  870.    This documentation used to include ASCII tables.  They have been
  871. removed since `recode' can now recreate these (and a lot of others)
  872. easily:
  873.      recode -lf us                   for commented ASCII
  874.      recode -ld us                   for concise decimal table
  875.      recode -lo us                   for concise octal table
  876.      recode -lh us                   for concise hexadecimal table
  877. File: recode.info,  Node: ISO 8859-1 charset,  Next: ASCII-BS,  Prev: ASCII,  Up: ISO charsets
  878. ASCII extended by Latin Alphabets
  879. =================================
  880.    This charset is available in `recode' under the name `Latin-1'.  In
  881. fact, it's true name is `ISO_8859-1:1987' as per RFC 1345, accepted
  882. aliases being `CP819', `IBM819', `ISO-8859-1', `ISO_8859-1',
  883. `iso-ir-100', `l1' and `Latin-1'.  The shortest way of specifying it in
  884. `recode' is `l1'.
  885.    This charset corresponds to the ISO Latin Alphabet 1.  It is an
  886. eight-bit code which coincides with ASCII for the lower half.
  887.    This documentation used to include Latin-1 tables.  They have been
  888. removed since `recode' can now recreate these (and a lot of others)
  889. easily:
  890.      recode -lf l1                   for commented ISO Latin-1
  891.      recode -ld l1                   for concise decimal table
  892.      recode -lo l1                   for concise octal table
  893.      recode -lh l1                   for concise hexadecimal table
  894.    The following from `lasko@video.dec.com' (Tim Lasko), with no date.
  895.      ISO Latin-1, or more completely ISO Latin Alphabet No 1, is now an
  896.      international standard as of February 1987 (IS 8859, Part 1).  For
  897.      those American USEnet'rs that care, the 8-bit ASCII standard,
  898.      which is essentially the same code, is going through the final
  899.      administrative processes prior to publication.
  900.      ISO Latin-1 (IS 8859/1) is actually one of an entire family of
  901.      eight-bit one-byte character sets, all having ASCII on the left
  902.      hand side, and with varying repertoires on the right hand side:
  903.   1. Latin Alphabet No 1 (caters to Western Europe - now approved).
  904.   2. Latin Alphabet No 2 (caters to Eastern Europe - now approved).
  905.   3. Latin Alphabet No 3 (caters to SE Europe + others - in draft
  906.      ballot).
  907.   4. Latin Alphabet No 4 (caters to Northern Europe - in draft ballot).
  908.   5. Latin-Cyrillic alphabet (right half all Cyrillic - processing
  909.      currently suspended pending USSR input).
  910.   6. Latin-Arabic alphabet (right half all Arabic - now approved).
  911.   7. Latin-Greek alphabet (right half Greek + symbols - in draft
  912.      ballot).
  913.   8. Latin-Hebrew alphabet (right half Hebrew + symbols - proposed).
  914. File: recode.info,  Node: ASCII-BS,  Next: flat,  Prev: ISO 8859-1 charset,  Up: ISO charsets
  915. ASCII 7-bits, BS to overstrike
  916. ==============================
  917.    This charset is available in `recode' under the name `ASCII-BS',
  918. with `BS' as an acceptable alias.
  919.    The file is straight ASCII, seven bits only.  According to the
  920. definition of ASCII: diacritics are applied by a sequence of three
  921. characters: the letter, one BS, the diacritic mark.  We deviate
  922. slightly from this by exchanging the diacritic mark and the letter so,
  923. on a screen device, the diacritic will disappear and let the letter
  924. alone.  At recognition time, both methods are acceptable.
  925.    The French quotes are coded by the sequences: `< BS "' or `" BS <'
  926. for the opening quote and `> BS "' or `" BS >' for the closing quote.
  927. This artificial convention was inherited in straight `ASCII-BS' from
  928. habits around `Bang-Bang' entry, and is not well known.  But we decided
  929. to stick to it so that `ASCII-BS' charset will not loose French quotes.
  930.    The `ASCII-BS' charset is independent of `ASCII', and different.
  931. The following examples demonstrate this, knowing at advance that `!2'
  932. is the `Bang-Bang' way of representing an `e' with an acute accent.
  933. Compare:
  934.      % echo \!2 | recode -v bang:us | od -bc
  935.      Bang-Bang -> ISO_8859-1:1987 -> RFC 1345 -> ANSI_X3.4-1968 (many to one)
  936.      Simplified to: Bang-Bang -> ISO_8859-1:1987 -> ANSI_X3.4-1968 (many to one)
  937.      0000000 351 012
  938.              351  \n
  939.      0000002
  940. with:
  941.      % echo \!2 | recode -v bang:bs | od -bc
  942.      Bang-Bang -> ISO_8859-1:1987 -> ASCII-BS (many to many)
  943.      0000000 047 010 145 012
  944.                '  \b   e  \n
  945.      0000004
  946.    In the first case, the `e' with an acute accent is merely
  947. transmitted by the `Latin-1:ASCII' mapping, not having a special
  948. recoding rule for it.  In the `Latin-1:ASCII-BS' case, the acute accent
  949. is applied over the `e' with a backspace: diacriticized characters have
  950. special rules.  For the `ASCII-BS' charset, reversibility is still
  951. possible, but there might be difficult cases.
  952. File: recode.info,  Node: flat,  Prev: ASCII-BS,  Up: ISO charsets
  953. ASCII without diacritics nor underline
  954. ======================================
  955.    This charset is available in `recode' under the name `flat'.
  956.    This code is ASCII expunged of all diacritics and underlines, as
  957. long as they are applied using three character sequences, with BS in the
  958. middle.  Also, despite slightly unrelated, each control character is
  959. represented by a sequence of two or three graphic characters.  The
  960. newline character, however, keeps its functionality and is not
  961. represented.
  962.    Note that charset `flat' is a terminal charset.  We can convert *to*
  963. `flat', but not *from* it.
  964. File: recode.info,  Node: IBM charsets,  Next: CDC charsets,  Prev: ISO charsets,  Up: Top
  965. Charsets based on IBM
  966. *********************
  967. * Menu:
  968. * EBCDIC::              EBCDIC codes
  969. * IBM-PC::              IBM's PC code
  970. * Icon-QNX::            Unisys' ICON code
  971. File: recode.info,  Node: EBCDIC,  Next: IBM-PC,  Prev: IBM charsets,  Up: IBM charsets
  972. EBCDIC code
  973. ===========
  974.    This charset is the IBM's external binary coded decimal for
  975. interchange coding.  This is an eight bits code.  The following three
  976. variants were implemented in GNU `recode' independently of RFC 1345:
  977. `EBCDIC'
  978.      GNU `recode' `us:ebcdic' conversion is identical to GNU `dd'
  979.      `ebcdic' conversion, and `recode' `ebcdic:us' conversion is
  980.      identical to GNU `dd' `ascii' conversion.  This charset also
  981.      represents the way Control Data Corporation relates EBCDIC to
  982.      8-bits ASCII.
  983. `EBCDIC-CCC'
  984.      GNU `recode' `us:ebcdic-ccc' or `ebcdic-ccc:us' conversions
  985.      represent the way Concurrent Computer Corporation (formerly Perkin
  986.      Elmer) relates EBCDIC to 8-bits ASCII.
  987. `EBCDIC-IBM'
  988.      GNU `recode' `us:ebcdic-ibm' conversion is *almost* identical to
  989.      GNU `dd' `ibm' conversion.  Given the exact `dd' `ibm' conversion
  990.      table, `recode' once said:
  991.           Codes  91 and 213 both recode to 173
  992.           Codes  93 and 229 both recode to 189
  993.           No character recodes to  74
  994.           No character recodes to 106
  995.      So I arbitrarily chose to recode 213 by 74 and 229 by 106.  This
  996.      makes the `EBCDIC-IBM' recoding reversible, but this is not
  997.      necessarily the best correction.  In any case, I believe GNU `dd'
  998.      should be corrected, and preferably, GNU `dd' and GNU `recode'
  999.      should agree on the same correction.  So, this table may change
  1000.      once again.
  1001.    RFC 1345 brings in `recode' 15 other EBCDIC charsets, and 21 other
  1002. charsets having EBCDIC in at least one of their alias names.  You can
  1003. get a list of all these by executing:
  1004.      recode -l | grep ebcdic
  1005. File: recode.info,  Node: IBM-PC,  Next: Icon-QNX,  Prev: EBCDIC,  Up: IBM charsets
  1006. IBM's PC code
  1007. =============
  1008.    This charset is available in `recode' under the name `IBM-PC'.
  1009. There are a few discrepancies between this charset and the very similar
  1010. RFC 1345 charset `ibm437', which have not been analyzed yet, so the
  1011. charsets are being kept separate for now.  This might change in the
  1012. future.
  1013.    The file was obtained or is aimed towards a PC microcomputer from
  1014. IBM or any compatible.  This is an eight-bit code.
  1015. File: recode.info,  Node: Icon-QNX,  Prev: IBM-PC,  Up: IBM charsets
  1016. Unisys' ICON code
  1017. =================
  1018.    This charset is available in `recode' under the name `Icon-QNX',
  1019. with `QNX' as an acceptable alias.
  1020.    The file is using Unisys' Icon way to represent diacritics with code
  1021. 25 escape sequences, under the system QNX.  This is a seven-bit code,
  1022. even if eight-bit codes can flow through as part of IBM-PC charset.
  1023. File: recode.info,  Node: CDC charsets,  Next: Micro charsets,  Prev: IBM charsets,  Up: Top
  1024. Charsets based on CDC
  1025. *********************
  1026. * Menu:
  1027. * Display Code::        Control Data's Display Code
  1028. * CDC-NOS::             ASCII 6/12 from NOS
  1029. * Bang-Bang::           ASCII "bang bang"
  1030. File: recode.info,  Node: Display Code,  Next: CDC-NOS,  Prev: CDC charsets,  Up: CDC charsets
  1031. Control Data's Display Code
  1032. ===========================
  1033.    This code is not available in `recode', but repeated here for
  1034. reference.  This is a 6-bit code used on CDC mainframes.
  1035.      Octal display code to graphic       Octal display code to octal ASCII
  1036.      
  1037.      00  :    20  P    40  5   60  #     00 072  20 120  40 065  60 043
  1038.      01  A    21  Q    41  6   61  [     01 101  21 121  41 066  61 133
  1039.      02  B    22  R    42  7   62  ]     02 102  22 122  42 067  62 135
  1040.      03  C    23  S    43  8   63  %     03 103  23 123  43 070  63 045
  1041.      04  D    24  T    44  9   64  "     04 104  24 124  44 071  64 042
  1042.      05  E    25  U    45  +   65  _     05 105  25 125  45 053  65 137
  1043.      06  F    26  V    46  -   66  !     06 106  26 126  46 055  66 041
  1044.      07  G    27  W    47  *   67  &     07 107  27 127  47 052  67 046
  1045.      10  H    30  X    50  /   70  '     10 110  30 130  50 057  70 047
  1046.      11  I    31  Y    51  (   71  ?     11 111  31 131  51 050  71 077
  1047.      12  J    32  Z    52  )   72  <     12 112  32 132  52 051  72 074
  1048.      13  K    33  0    53  $   73  >     13 113  33 060  53 044  73 076
  1049.      14  L    34  1    54  =   74  @     14 114  34 061  54 075  74 100
  1050.      15  M    35  2    55      75  \     15 115  35 062  55 040  75 134
  1051.      16  N    36  3    56  ,   76  ^     16 116  36 063  56 054  76 136
  1052.      17  O    37  4    57  .   77  ;     17 117  37 064  57 056  77 073
  1053. File: recode.info,  Node: CDC-NOS,  Next: Bang-Bang,  Prev: Display Code,  Up: CDC charsets
  1054. ASCII 6/12 from NOS
  1055. ===================
  1056.    This charset is available in `recode' under the name `CDC-NOS', with
  1057. `NOS' as an acceptable alias.
  1058.    This is one of the charset in use on CDC Cyber NOS systems to
  1059. represent ASCII, sometimes named "NOS 6/12" code for coding ASCII.
  1060. This code is also known as "caret ASCII".  It is based on a six bits
  1061. character set in which small letters and control characters are coded
  1062. using a `^' escape and, sometimes, a `@' escape.
  1063.    The routines given here presume that the six bits code is already
  1064. expressed in ASCII by the communication channel, with embedded ASCII
  1065. `^' and `@' escapes.
  1066.    Here is a table showing which characters are being used to encode
  1067. each ASCII character.
  1068.      000  ^5  020  ^#  040     060  0  100 @A  120  P  140  @G  160  ^P
  1069.      001  ^6  021  ^[  041  !  061  1  101  A  121  Q  141  ^A  161  ^Q
  1070.      002  ^7  022  ^]  042  "  062  2  102  B  122  R  142  ^B  162  ^R
  1071.      003  ^8  023  ^%  043  #  063  3  103  C  123  S  143  ^C  163  ^S
  1072.      004  ^9  024  ^"  044  $  064  4  104  D  124  T  144  ^D  164  ^T
  1073.      005  ^+  025  ^_  045  %  065  5  105  E  125  U  145  ^E  165  ^U
  1074.      006  ^-  026  ^!  046  &  066  6  106  F  126  V  146  ^F  166  ^V
  1075.      007  ^*  027  ^&  047  '  067  7  107  G  127  W  147  ^G  167  ^W
  1076.      010  ^/  030  ^'  050  (  070  8  110  H  130  X  150  ^H  170  ^X
  1077.      011  ^(  031  ^?  051  )  071  9  111  I  131  Y  151  ^I  171  ^Y
  1078.      012  ^)  032  ^<  052  *  072 @D  112  J  132  Z  152  ^J  172  ^Z
  1079.      013  ^$  033  ^>  053  +  073  ;  113  K  133  [  153  ^K  173  ^0
  1080.      014  ^=  034  ^@  054  ,  074  <  114  L  134  \  154  ^L  174  ^1
  1081.      015  ^   035  ^\  055  -  075  =  115  M  135  ]  155  ^M  175  ^2
  1082.      016  ^,  036  ^^  056  .  076  >  116  N  136 @B  156  ^N  176  ^3
  1083.      017  ^.  037  ^;  057  /  077  ?  117  O  137  _  157  ^O  177  ^4
  1084. File: recode.info,  Node: Bang-Bang,  Prev: CDC-NOS,  Up: CDC charsets
  1085. ASCII "bang bang"
  1086. =================
  1087.    This charset is available in `recode' under the name `Bang-Bang'.
  1088.    This is the local code in use on Cybers at Universite de Montreal,
  1089. which grave and serious people there prefer to name "ASCII code
  1090. display".  This code is also known as "Bang-bang".  It is based on a
  1091. six bits character set in which capitals, French diacritics and a few
  1092. others are coded using an `!' escape followed by a single character, and
  1093. control characters using a double `!' escape followed by a single
  1094. character.
  1095.    The routines given here presume that the six bits code is already
  1096. expressed in ASCII by the communication channel, with embedded ASCII `!'
  1097. escapes.
  1098.    Here is a table showing which characters are being used to encode
  1099. each ASCII character.
  1100.      000 !!@  020 !!P  040    060 0  100 @   120 !P  140 !@ 160 P
  1101.      001 !!A  021 !!Q  041 !" 061 1  101 !A  121 !Q  141 A  161 Q
  1102.      002 !!B  022 !!R  042 "  062 2  102 !B  122 !R  142 B  162 R
  1103.      003 !!C  023 !!S  043 #  063 3  103 !C  123 !S  143 C  163 S
  1104.      004 !!D  024 !!T  044 $  064 4  104 !D  124 !T  144 D  164 T
  1105.      005 !!E  025 !!U  045 %  065 5  105 !E  125 !U  145 E  165 U
  1106.      006 !!F  026 !!V  046 &  066 6  106 !F  126 !V  146 F  166 V
  1107.      007 !!G  027 !!W  047 '  067 7  107 !G  127 !W  147 G  167 W
  1108.      010 !!H  030 !!X  050 (  070 8  110 !H  130 !X  150 H  170 X
  1109.      011 !!I  031 !!Y  051 )  071 9  111 !I  131 !Y  151 I  171 Y
  1110.      012 !!J  032 !!Z  052 *  072 :  112 !J  132 !Z  152 J  172 Z
  1111.      013 !!K  033 !![  053 +  073 ;  113 !K  133 [   153 K  173 ![
  1112.      014 !!L  034 !!\  054 ,  074 <  114 !L  134 \   154 L  174 !\
  1113.      015 !!M  035 !!]  055 -  075 =  115 !M  135 ]   155 M  175 !]
  1114.      016 !!N  036 !!^  056 .  076 >  116 !N  136 ^   156 N  176 !^
  1115.      017 !!O  037 !!_  057 /  077 ?  117 !O  137 _   157 O  177 !_
  1116. File: recode.info,  Node: Micro charsets,  Next: Other charsets,  Prev: CDC charsets,  Up: Top
  1117. Non-IBM micro-computer charsets
  1118. *******************************
  1119. * Menu:
  1120. * Apple-Mac::           Apple's Macintosh code
  1121. * AtariST::             Atari ST code
  1122. * NeXT::                NeXT international code
  1123. File: recode.info,  Node: Apple-Mac,  Next: AtariST,  Prev: Micro charsets,  Up: Micro charsets
  1124. Apple's Macintosh code
  1125. ======================
  1126.    This charset is available in `recode' under the name `Apple-Mac'.
  1127. There are a few discrepancies between this charset and the very similar
  1128. RFC 1345 charset `macintosh', which have not been analyzed yet, so the
  1129. charsets are being kept separate for now.  This might change in the
  1130. future.
  1131.    The file has been obtained or is aimed to a Macintosh micro-computer
  1132. from Apple.  This is an eight bit code.  The file is the data fork only.
  1133. File: recode.info,  Node: AtariST,  Next: NeXT,  Prev: Apple-Mac,  Up: Micro charsets
  1134. Atari ST code
  1135. =============
  1136.    This charset is available in `recode' under the name `AtariST'.
  1137.    This is the character set used on the Atari ST/TT/Falcon.  This is
  1138. similar to `IBM-PC', but differs in some details (includes some more
  1139. accented characters, the graphic characters are mostly replaced by
  1140. hebrew characters, and there is a true German sharp s different from
  1141. Greek beta).
  1142.    About the end-of-line conversions: the canonical end-of-line on the
  1143. Atari is `\r\n', but unlike `IBM-PC', the OS makes no difference
  1144. between text and binary input/output; it is up to the application how
  1145. to interpret the data.  In fact, most of the libraries that come with
  1146. compilers can grok both `\r\n' and `\n' as end of lines.  Many of the
  1147. users who also have access to Unix systems prefer `\n' to ease porting
  1148. Unix utilities.  So, for easing reversibility, `recode' tries to let
  1149. `\r' undisturbed through recodings.
  1150. File: recode.info,  Node: NeXT,  Prev: AtariST,  Up: Micro charsets
  1151. NeXT international code
  1152. =======================
  1153.    This charset is available in `recode' under the name `NeXT'.
  1154.    The NeXT encoding is an extension to the ISO Latin-1 ASCII encoding
  1155. used by NeXT under the system NeXTSTEP.  It is identical to Latin-1 for
  1156. the positions 0-127.  In the position 128-255, NeXT added some chars and
  1157. shuffled them around a little bit (for some unknown reason).
  1158. File: recode.info,  Node: Other charsets,  Next: Internals,  Prev: Micro charsets,  Up: Top
  1159. Some other charsets
  1160. *******************
  1161.    Even if these charsets were originally added to `recode' for
  1162. handling texts written in French, they find other uses.  We did use them
  1163. lot for writing French diacriticized texts in the past, so `recode'
  1164. knows how to handle these particularly well for French texts.
  1165. * Menu:
  1166. * LaTeX::               ASCII with LaTeX codes
  1167. * Texte::               ASCII with easy French conventions
  1168. * HTML::                World Wide Web representations
  1169. File: recode.info,  Node: LaTeX,  Next: Texte,  Prev: Other charsets,  Up: Other charsets
  1170. ASCII with LaTeX codes
  1171. ======================
  1172.    This charset is available in `recode' under the name `LaTeX' and has
  1173. `ltex' as an alias.  It is used for ASCII files coded to be read by
  1174. LaTeX or, in certain cases, by TeX.
  1175.    Whenever you recode from another charset to `LaTeX', beware that all
  1176. occurrences of backslashes `\' are usually translated into the string
  1177. `\backslash{}'.  However, in practice, people often use backslashes in
  1178. the other charset for introducing TeX commands, compromising it: it is
  1179. not pure TeX, nor it is pure other charset.  This translation of
  1180. backslashes into `\backslash{}' can be rather inconvenient, it may be
  1181. inhibited through the command option `-d'.
  1182. File: recode.info,  Node: Texte,  Next: HTML,  Prev: LaTeX,  Up: Other charsets
  1183. ASCII with easy French conventions
  1184. ==================================
  1185.    This charset is available in `recode' under the name `Texte' and has
  1186. `txte' for an alias.
  1187.    This charset is a seven bits code, identical to `ASCII-BS', save for
  1188. French diacritics which are noted using a slightly different convention.
  1189.    At text entry time, these conventions provide a little speed up.  At
  1190. read time, they slightly improve the readability over a few alternate
  1191. ways of coding diacritics.  Of course, it would better to have a
  1192. specialized keyboard to make direct eight bits entries and fonts for
  1193. immediately displaying eight bit ISO Latin-1 characters.  But not
  1194. everybody is so fortunate.  In several mailing environments, the eight
  1195. bit is often willingfully destroyed.
  1196.    Easy French has been in use in France for a while.  I only slightly
  1197. adapted it (the diaeresis option) to make it more comfortable to several
  1198. usages in Qu'ebec originating from Universit'e de Montr'eal.  In fact,
  1199. the main problem for me was not to necessarily to invent Easy French,
  1200. but to recognize the "best" convention to use, (best is not being
  1201. defined, here) and to try to solve the main pitfalls associated with
  1202. the selected convention.
  1203. * Menu:
  1204. * Diacritics::          Diacritics
  1205. * Ending diaeresis::    List of words ending with diaeresis
  1206. File: recode.info,  Node: Diacritics,  Next: Ending diaeresis,  Prev: Texte,  Up: Texte
  1207. Diacritics
  1208. ----------
  1209.    French quotes (sometimes called "angle quotes") are noted the same
  1210. way English quotes are noted in TeX, *id est* by ```' and `'''.
  1211.    No effort has been put to preserve Latin ligatures (`ae', `oe')
  1212. which are representable in several other charsets.  So, these ligatures
  1213. may be lost through Easy French conventions.
  1214.    This is almost the French convention for simplified diacritics entry:
  1215.      Acute accent
  1216.      Grave accent
  1217.      Circumflex accent
  1218.      Diaeresis
  1219.      Cedilla
  1220.    In some countries, `:' is used instead of `"' to mark diaeresis.
  1221. `recode' support one convention on a single call, depending on the `-c'
  1222. option of the `recode' command.
  1223.    The convention is prone to loosing information, because the diacritic
  1224. meaning overloads some characters that already have other uses.  To
  1225. alleviate this, some knowledge of the French language is boosted into
  1226. the recognition routines.  So, the following subtleties are
  1227. systematically obeyed by the various recognizers.
  1228.    * A single quote which follows a `e' does not necessarily means an
  1229.      acute accent if it is followed by a single other one.  For example:
  1230.     `e''
  1231.           will give an `e' with an acute accent.
  1232.     `e'''
  1233.           will give a simple `e', with a closing quotation mark.
  1234.     `e''''
  1235.           will give an `e' with an acute accent, followed by a closing
  1236.           quotation mark.
  1237.      There is a problem induced by this convention if there are English
  1238.      quotations with a French text.  In sentences like:
  1239.           There's a meeting at Archie's restaurant.
  1240.      the single quotes will be mistaken twice for acute accents.  So
  1241.      English contractions and suffix possessives could be mangled.
  1242.    * A double quote or colon, depending on `-c' option, which follows a
  1243.      vowel is interpreted as diaeresis only if it is followed by another
  1244.      letter.  But there are in French several words that *end* with a
  1245.      diaeresis, the program also recognizes them.  *Note Ending
  1246.      diaeresis::, for a study of all the problematic cases.
  1247.    * A comma which follows a `c' is interpreted as a cedilla only if it
  1248.      is followed by one of the vowels `a', `o' and `u'.
  1249. File: recode.info,  Node: Ending diaeresis,  Prev: Diacritics,  Up: Texte
  1250. List of words ending with diaeresis
  1251. -----------------------------------
  1252.    Here is a classification of all cases of a diaeresis at the end of a
  1253. French word:
  1254.    * Words ending in "igue"
  1255.         - Feminine words without a relative masculine: `besaigue"' and
  1256.           `cigue"'.
  1257.         - Feminine words with a relative masculine (1): `aigue"',
  1258.           `ambigue"', `contigue"', `exigue"', `subaigue"' and
  1259.           `suraigue"'.
  1260.    * Words not ending in "igue"
  1261.         - Ended by "i" (2): `ai"', `congai"', `goi"', `hai"kai"',
  1262.           `inoui"', `sai"', `samurai"', `thai"' and `tokai"'.
  1263.         - Ended by "e": `canoe"'.
  1264.         - Ended by "u" (3): `Esau"'.
  1265.    Notes:
  1266.   1. There are supposed to be seven words in this case.  So, one is
  1267.      missing.
  1268.   2. Look at one of the following sentences (the second has to be
  1269.      interpreted with the `-c' option):
  1270.           "Ai"e!  Voici le proble`me que j'ai"
  1271.           Ai:e!  Voici le proble`me que j'ai:
  1272.      There is an ambiguity between an `ai"', the small animal, and the
  1273.      indicative future of *avoir* (first person singular), when followed
  1274.      by what could be a diaeresis mark.  Hopefully, the case is solved
  1275.      by the fact that an apostrophe always precedes the verb and almost
  1276.      never the animal.
  1277.   3. I did not pay attention to proper nouns, but this one showed up as
  1278.      being fairly evident.
  1279.    Just to complete this topic, note that it would be wrong to make a
  1280. rule for all words ending in "igue" as needing a diaerisis.  Here are
  1281. counter-examples: `becfigue', `be`sigue', `bigue', `bordigue',
  1282. `bourdigue', `brigue', `contre-digue', `digue', `d'intrigue',
  1283. `fatigue', `figue', `garrigue', `gigue', `igue', `intrigue', `ligue',
  1284. `prodigue', `sarigue' and `zigue'.
  1285. File: recode.info,  Node: HTML,  Prev: Texte,  Up: Other charsets
  1286. World Wide Web representations
  1287. ==============================
  1288.    This charset is available in `recode' under the name `HTML' and has
  1289. `w3' and `WWW' for aliases.
  1290.    HTML texts used by World Wide Web limit themselves to 7-bit
  1291. characters internally, special sequences beginning with an ampersand
  1292. `&' and ending with a semicolon `;' are used for representing characters
  1293. from Latin-1 having the 8th bit set.
  1294.    When you recode from another charset to `HTML', beware that all
  1295. occurrences of ampersands are usually translated into the string
  1296. `&', similarly, left angle brackets `<' are translated into `<'
  1297. and right angle brackets `>' are translated into `>'.  However, in
  1298. practice, people often use ampersands and angle brackets in the other
  1299. charset for introducing HTML commands, compromising it: it is not pure
  1300. HTML, not it is pure other charset.  These three translations can be
  1301. rather inconvenient, they may be specifically inhibited through the
  1302. command option `-d'.
  1303. File: recode.info,  Node: Internals,  Prev: Other charsets,  Up: Top
  1304. Internal aspects
  1305. ****************
  1306.    Suppose that four elementary steps are selected at path optimization
  1307. time.  Then `recode' will split itself into four different tasks
  1308. interconnected with pipes, logically equivalent to:
  1309.      STEP1 <INPUT | STEP2 | STEP3 | STEP4 >OUTPUT
  1310. * Menu:
  1311. * Main flow::           Overall organization
  1312. * New charsets::        Adding new charsets
  1313. File: recode.info,  Node: Main flow,  Next: New charsets,  Prev: Internals,  Up: Internals
  1314. Overall organization
  1315. ====================
  1316.    The main driver constructs, while initializing all conversion
  1317. modules, a table giving all the conversion routines available ("single
  1318. step"s) and for each, the starting charset and the ending charset.  If
  1319. we consider these charsets as being the nodes of a directed graph, each
  1320. single step may be considered as oriented arc from one node to the
  1321. other.  A cost is attributed to each arc: for example, a high penalty
  1322. is given to single steps which are prone to loosing characters, a low
  1323. penalty is given to those which need studying more than one input
  1324. character for producing an output character, etc.
  1325.    Given a starting code and a goal code, `recode' computes the most
  1326. economical route through the elementary recodings, that is, the best
  1327. sequence of conversions that will transform the input charset into the
  1328. final charset.  To speed up execution, `recode' looks for subsequences
  1329. of conversions which are simple enough to be merged, it then
  1330. dynamically creates new single steps for these mergings.
  1331.    A "double step" is a sequence of two single steps, the output of the
  1332. first being the special charset `rfc1345', the input of the second
  1333. single step being also `rfc1345'.  A special machinery dynamically
  1334. produces efficient, reversible, merge-able single steps out of these
  1335. double steps.
  1336.    The main part of `recode' is written in C, as are most single steps.
  1337. A few single steps need to recognize sequences of multiple characters,
  1338. they are often better written in `flex'.
  1339. File: recode.info,  Node: New charsets,  Prev: Main flow,  Up: Internals
  1340. Adding new charsets
  1341. ===================
  1342.    It is easy for a programmer to add a new charset to `recode'.  All
  1343. it requires is making a few functions kept in a single `.c' file,
  1344. adjusting `Makefile.in', and remaking `recode'.
  1345.    One of the function should convert from any previous charset to the
  1346. new one.  Any previous charset will do, but try to select it so you
  1347. will not loose too much information while converting.  The other
  1348. function should convert from the new charset to any older one.  You do
  1349. not have to select the same old charset than what you selected for the
  1350. previous routine.  Once again, select any charset for which you will
  1351. not loose too much information while converting.
  1352.    If, for any of these two functions, you have to read multiple bytes
  1353. of the old charset before recognizing the character to produce, you
  1354. might prefer programming it in `flex' in a separate `.l' file.
  1355. Prototype your C or `flex' files after one of those which exist
  1356. already, so to keep the sources uniform.  Besides, at `make' time, all
  1357. `.l' files are automatically merged into a single big one by the script
  1358. `mergelex.awk', which requires sources to follow some rules.  Mimetism
  1359. is a simple approach which relieves me of explaining all these rules!
  1360.    Each of your source files should have its own initialization
  1361. function, named `module_CHARSET', which is meant to be executed
  1362. quickly, once, prior to any recoding.  It should declare the name of
  1363. your charsets and the single steps (or elementary recodings) you
  1364. provide, by calling `declare_step' one or more times.  Besides the
  1365. charset names, `declare_step' expects a description of the recoding
  1366. quality (see `recode.h') and two functions you also provide.
  1367.    The first such function has the purpose of allocating structures,
  1368. preconditioning conversion tables, etc.  It is also the usual way of
  1369. further modifying the `STEP' structure.  This function is executed only
  1370. if and when the single step is retained in an actual recoding sequence.
  1371. If you do not need such delayed initialization, merely use `NULL' for
  1372. the function argument.
  1373.    The second function executes the elementary recoding on a whole file.
  1374. There are a few cases when you can spare writing this function:
  1375.    * Some single steps do nothing else than a pure copy of the input
  1376.      onto the output, in this case, you can use the predefined function
  1377.      `file_one_to_one', while having a delayed initialization for
  1378.      presetting the `STEP' field `one_to_one' to the predefined value
  1379.      `one_to_same'.
  1380.    * Some single steps are driven by a table which recodes one
  1381.      character into another; if the recoding does nothing else, you can
  1382.      use the predefined function `file_one_to_one', while having a
  1383.      delayed initialization for presetting the `STEP' field
  1384.      `one_to_one' with your table.
  1385.    * Some single steps are driven by a table which recodes one
  1386.      character into a string; if the recoding does nothing else, you
  1387.      can use the predefined function `file_one_to_many', while having a
  1388.      delayed initialization for presetting the `STEP' field
  1389.      `one_to_many' with your table.
  1390.    If you have a recoding table handy in a suitable format but do not
  1391. use one of the predefined recoding functions, it is still a good idea
  1392. to use a delayed initialization to save it anyway, because `recode'
  1393. option `-h' will take advantage of this information when available.
  1394.    Finally, edit `Makefile.in' to add the source file name of your
  1395. routines to the `C_STEPS' or `L_STEPS' macro definition, depending on
  1396. the fact your routines is written in C or in `flex'.  For C files only,
  1397. also modify the `STEPOBJS' macro definition.
  1398. Tag Table:
  1399. Node: Top
  1400. Node: Introduction
  1401. Node: Overview
  1402. Node: Contributing
  1403. Node: Invoking recode
  1404. Node: Reversibility
  1405. 21822
  1406. Node: RFC 1345 charsets
  1407. 26100
  1408. Node: ISO charsets
  1409. 43498
  1410. Node: ASCII
  1411. 43868
  1412. Node: ISO 8859-1 charset
  1413. 44708
  1414. Node: ASCII-BS
  1415. 46933
  1416. Node: flat
  1417. 48990
  1418. Node: IBM charsets
  1419. 49658
  1420. Node: EBCDIC
  1421. 49924
  1422. Node: IBM-PC
  1423. 51659
  1424. Node: Icon-QNX
  1425. 52179
  1426. Node: CDC charsets
  1427. 52603
  1428. Node: Display Code
  1429. 52892
  1430. Node: CDC-NOS
  1431. 54404
  1432. Node: Bang-Bang
  1433. 56369
  1434. Node: Micro charsets
  1435. 58280
  1436. Node: Apple-Mac
  1437. 58586
  1438. Node: AtariST
  1439. 59167
  1440. Node: NeXT
  1441. 60165
  1442. Node: Other charsets
  1443. 60628
  1444. Node: LaTeX
  1445. 61203
  1446. Node: Texte
  1447. 61983
  1448. Node: Diacritics
  1449. 63379
  1450. Node: Ending diaeresis
  1451. 65675
  1452. Node: HTML
  1453. 67497
  1454. Node: Internals
  1455. 68545
  1456. Node: Main flow
  1457. 68992
  1458. Node: New charsets
  1459. 70606
  1460. End Tag Table
  1461.