home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / GNU / recode-3.4-MIHS / src / recode.info < prev    next >
Encoding:
GNU Info File  |  1994-11-06  |  73.3 KB  |  1,950 lines

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