home *** CD-ROM | disk | FTP | other *** search
/ The Hacker's Encyclopedia 1998 / hackers_encyclopedia.iso / rfc / 3 / rfc2277.txt < prev    next >
Encoding:
Text File  |  2003-06-11  |  16.2 KB  |  508 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                     H. Alvestrand
  8. Request for Comments: 2277                                      UNINETT
  9. BCP: 18                                                    January 1998
  10. Category: Best Current Practice
  11.  
  12.  
  13.               IETF Policy on Character Sets and Languages
  14.  
  15. Status of this Memo
  16.  
  17.    This document specifies an Internet Best Current Practices for the
  18.    Internet Community, and requests discussion and suggestions for
  19.    improvements.  Distribution of this memo is unlimited.
  20.  
  21. Copyright Notice
  22.  
  23.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  24.  
  25. 1.  Introduction
  26.  
  27.    The Internet is international.
  28.  
  29.    With the international Internet follows an absolute requirement to
  30.    interchange data in a multiplicity of languages, which in turn
  31.    utilize a bewildering number of characters.
  32.  
  33.    This document is the current policies being applied by the Internet
  34.    Engineering Steering Group (IESG) towards the standardization efforts
  35.    in the Internet Engineering Task Force (IETF) in order to help
  36.    Internet protocols fulfill these requirements.
  37.  
  38.    The document is very much based upon the recommendations of the IAB
  39.    Character Set Workshop of February 29-March 1, 1996, which is
  40.    documented in RFC 2130 [WR].  This document attempts to be concise,
  41.    explicit and clear; people wanting more background are encouraged to
  42.    read RFC 2130.
  43.  
  44.    The document uses the terms 'MUST', 'SHOULD' and 'MAY', and their
  45.    negatives, in the way described in [RFC 2119].  In this case, 'the
  46.    specification' as used by RFC 2119 refers to the processing of
  47.    protocols being submitted to the IETF standards process.
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58. Alvestrand               Best Current Practice                  [Page 1]
  59.  
  60. RFC 2277                     Charset Policy                 January 1998
  61.  
  62.  
  63. 2.  Where to do internationalization
  64.  
  65.    Internationalization is for humans. This means that protocols are not
  66.    subject to internationalization; text strings are. Where protocol
  67.    elements look like text tokens, such as in many IETF application
  68.    layer protocols, protocols MUST specify which parts are protocol and
  69.    which are text. [WR 2.2.1.1]
  70.  
  71.    Names are a problem, because people feel strongly about them, many of
  72.    them are mostly for local usage, and all of them tend to leak out of
  73.    the local context at times. RFC 1958 [RFC 1958] recommends US-ASCII
  74.    for all globally visible names.
  75.  
  76.    This document does not mandate a policy on name internationalization,
  77.    but requires that all protocols describe whether names are
  78.    internationalized or US-ASCII.
  79.  
  80.    NOTE: In the protocol stack for any given application, there is
  81.    usually one or a few layers that need to address these problems.
  82.  
  83.    It would, for instance, not be appropriate to define language tags
  84.    for Ethernet frames. But it is the responsibility of the WGs to
  85.    ensure that whenever responsibility for internationalization is left
  86.    to "another layer", those responsible for that layer are in fact
  87.    aware that they HAVE that responsibility.
  88.  
  89. 3.  Definition of Terms
  90.  
  91.    This document uses the term "charset" to mean a set of rules for
  92.    mapping from a sequence of octets to a sequence of characters, such
  93.    as the combination of a coded character set and a character encoding
  94.    scheme; this is also what is used as an identifier in MIME "charset="
  95.    parameters, and registered in the IANA charset registry [REG].  (Note
  96.    that this is NOT a term used by other standards bodies, such as ISO).
  97.  
  98.    For a definition of the term "coded character set", refer to the
  99.    workshop report.
  100.  
  101.    A "name" is an identifier such as a person's name, a hostname, a
  102.    domainname, a filename or an E-mail address; it is often treated as
  103.    an identifier rather than as a piece of text, and is often used in
  104.    protocols as an identifier for entities, without surrounding text.
  105.  
  106. 3.1.  What charset to use
  107.  
  108.    All protocols MUST identify, for all character data, which charset is
  109.    in use.
  110.  
  111.  
  112.  
  113.  
  114. Alvestrand               Best Current Practice                  [Page 2]
  115.  
  116. RFC 2277                     Charset Policy                 January 1998
  117.  
  118.  
  119.    Protocols MUST be able to use the UTF-8 charset, which consists of
  120.    the ISO 10646 coded character set combined with the UTF-8 character
  121.    encoding scheme, as defined in [10646] Annex R (published in
  122.    Amendment 2), for all text.
  123.  
  124.    Protocols MAY specify, in addition, how to use other charsets or
  125.    other character encoding schemes for ISO 10646, such as UTF-16, but
  126.    lack of an ability to use UTF-8 is a violation of this policy; such a
  127.    violation would need a variance procedure ([BCP9] section 9) with
  128.    clear and solid justification in the protocol specification document
  129.    before being entered into or advanced upon the standards track.
  130.  
  131.    For existing protocols or protocols that move data from existing
  132.    datastores, support of other charsets, or even using a default other
  133.    than UTF-8, may be a requirement. This is acceptable, but UTF-8
  134.    support MUST be possible.
  135.  
  136.    When using other charsets than UTF-8, these MUST be registered in the
  137.    IANA charset registry, if necessary by registering them when the
  138.    protocol is published.
  139.  
  140.    (Note: ISO 10646 calls the UTF-8 CES a "Transformation Format" rather
  141.    than a "character encoding scheme", but it fits the charset workshop
  142.    report definition of a character encoding scheme).
  143.  
  144. 3.2.  How to decide a charset
  145.  
  146.    When the protocol allows a choice of multiple charsets, someone must
  147.    make a decision on which charset to use.
  148.  
  149.    In some cases, like HTTP, there is direct or semi-direct
  150.    communication between the producer and the consumer of data
  151.    containing text. In such cases, it may make sense to negotiate a
  152.    charset before sending data.
  153.  
  154.    In other cases, like E-mail or stored data, there is no such
  155.    communication, and the best one can do is to make sure the charset is
  156.    clearly identified with the stored data, and choosing a charset that
  157.    is as widely known as possible.
  158.  
  159.    Note that a charset is an absolute; text that is encoded in a charset
  160.    cannot be rendered comprehensibly without supporting that charset.
  161.  
  162.    (This also applies to English texts; charsets like EBCDIC do NOT have
  163.    ASCII as a proper subset)
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Alvestrand               Best Current Practice                  [Page 3]
  171.  
  172. RFC 2277                     Charset Policy                 January 1998
  173.  
  174.  
  175.    Negotiating a charset may be regarded as an interim mechanism that is
  176.    to be supported until support for interchange of UTF-8 is prevalent;
  177.    however, the timeframe of "interim" may be at least 50 years, so
  178.    there is every reason to think of it as permanent in practice.
  179.  
  180. 4.  Languages
  181.  
  182. 4.1.  The need for language information
  183.  
  184.    All human-readable text has a language.
  185.  
  186.    Many operations, including high quality formatting, text-to-speech
  187.    synthesis, searching, hyphenation, spellchecking and so on benefit
  188.    greatly from access to information about the language of a piece of
  189.    text. [WC 3.1.1.4].
  190.  
  191.    Humans have some tolerance for foreign languages, but are generally
  192.    very unhappy with being presented text in a language they do not
  193.    understand; this is why negotiation of language is needed.
  194.  
  195.    In most cases, machines will not be able to deduce the language of a
  196.    transmitted text by themselves; the protocol must specify how to
  197.    transfer the language information if it is to be available at all.
  198.  
  199.    The interaction between language and processing is complex; for
  200.    instance, if I compare "name-of-thing(lang=en)" to "name-of-
  201.    thing(lang=no)" for equality, I will generally expect a match, while
  202.    the word "ask(no)" is a kind of tree, and is hardly useful as a
  203.    command verb.
  204.  
  205. 4.2.  Requirement for language tagging
  206.  
  207.    Protocols that transfer text MUST provide for carrying information
  208.    about the language of that text.
  209.  
  210.    Protocols SHOULD also provide for carrying information about the
  211.    language of names, where appropriate.
  212.  
  213.    Note that this does NOT mean that such information must always be
  214.    present; the requirement is that if the sender of information wishes
  215.    to send information about the language of a text, the protocol
  216.    provides a well-defined way to carry this information.
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Alvestrand               Best Current Practice                  [Page 4]
  227.  
  228. RFC 2277                     Charset Policy                 January 1998
  229.  
  230.  
  231. 4.3.  How to identify a language
  232.  
  233.    The RFC 1766 language tag is at the moment the most flexible tool
  234.    available for identifying a language; protocols SHOULD use this, or
  235.    provide clear and solid justification for doing otherwise in the
  236.    document.
  237.  
  238.    Note also that a language is distinct from a POSIX locale; a POSIX
  239.    locale identifies a set of cultural conventions, which may imply a
  240.    language (the POSIX or "C" locale of course do not), while a language
  241.    tag as described in RFC 1766 identifies only a language.
  242.  
  243. 4.4.  Considerations for language negotiation
  244.  
  245.    Protocols where users have text presented to them in response to user
  246.    actions MUST provide for support of multiple languages.
  247.  
  248.    How this is done will vary between protocols; for instance, in some
  249.    cases, a negotiation where the client proposes a set of languages and
  250.    the server replies with one is appropriate; in other cases, a server
  251.    may choose to send multiple variants of a text and let the client
  252.    pick which one to display.
  253.  
  254.    Negotiation is useful in the case where one side of the protocol
  255.    exchange is able to present text in multiple languages to the other
  256.    side, and the other side has a preference for one of these; the most
  257.    common example is the text part of error responses, or Web pages that
  258.    are available in multiple languages.
  259.  
  260.    Negotiating a language should be regarded as a permanent requirement
  261.    of the protocol that will not go away at any time in the future.
  262.  
  263.    In many cases, it should be possible to include it as part of the
  264.    connection establishment, together with authentication and other
  265.    preferences negotiation.
  266.  
  267. 4.5.  Default Language
  268.  
  269.    When human-readable text must be presented in a context where the
  270.    sender has no knowledge of the recipient's language preferences (such
  271.    as login failures or E-mailed warnings, or prior to language
  272.    negotiation), text SHOULD be presented in Default Language.
  273.  
  274.    Default Language is assigned the tag "i-default" according to the
  275.    procedures of RFC 1766. It is not a specific language, but rather
  276.    identifies the condition where the language preferences of the user
  277.    cannot be established.
  278.  
  279.  
  280.  
  281.  
  282. Alvestrand               Best Current Practice                  [Page 5]
  283.  
  284. RFC 2277                     Charset Policy                 January 1998
  285.  
  286.  
  287.    Messages in Default Language MUST be understandable by an English-
  288.    speaking person, since English is the language which, worldwide, the
  289.    greatest number of people will be able to get adequate help in
  290.    interpreting when working with computers.
  291.  
  292.    Note that negotiating English is NOT the same as Default Language;
  293.    Default Language is an emergency measure in otherwise unmanageable
  294.    situations.
  295.  
  296.    In many cases, using only English text is reasonable; in some cases,
  297.    the English text may be augumented by text in other languages.
  298.  
  299. 5.  Locale
  300.  
  301.    The POSIX standard [POSIX] defines a concept called a "locale", which
  302.    includes a lot of information about collating order for sorting, date
  303.    format, currency format and so on.
  304.  
  305.    In some cases, and especially with text where the user is expected to
  306.    do processing on the text, locale information may be usefully
  307.    attached to the text; this would identify the sender's opinion about
  308.    appropriate rules to follow when processing the document, which the
  309.    recipient may choose to agree with or ignore.
  310.  
  311.    This document does not require the communication of locale
  312.    information on all text, but encourages its inclusion when
  313.    appropriate.
  314.  
  315.    Note that language and character set information will often be
  316.    present as parts of a locale tag (such as no_NO.iso-8859-1; the
  317.    language is before the underscore and the character set is after the
  318.    dot); care must be taken to define precisely which specification of
  319.    character set and language applies to any one text item.
  320.  
  321.    The default locale is the "POSIX" locale.
  322.  
  323. 6.  Documenting internationalization decisions
  324.  
  325.    In documents that deal with internationalization issues at all, a
  326.    synopsis of the approaches chosen for internationalization SHOULD be
  327.    collected into a section called "Internationalization
  328.    considerations", and placed next to the Security Considerations
  329.    section.
  330.  
  331.    This provides an easy reference for those who are looking for advice
  332.    on these issues when implementing the protocol.
  333.  
  334.  
  335.  
  336.  
  337.  
  338. Alvestrand               Best Current Practice                  [Page 6]
  339.  
  340. RFC 2277                     Charset Policy                 January 1998
  341.  
  342.  
  343. 7.  Security Considerations
  344.  
  345.    Apart from the fact that security warnings in a foreign language may
  346.    cause inappropriate behaviour from the user, and the fact that
  347.    multilingual systems usually have problems with consistency between
  348.    language variants, no security considerations relevant have been
  349.    identified.
  350.  
  351. 8.  References
  352.  
  353.    [10646]
  354.         ISO/IEC, Information Technology - Universal Multiple-Octet Coded
  355.         Character Set (UCS) - Part 1: Architecture and Basic
  356.         Multilingual Plane, May 1993, with amendments
  357.  
  358.    [RFC 2119]
  359.         Bradner, S., "Key words for use in RFCs to Indicate Requirement
  360.         Levels", BCP 14, RFC 2119, March 1997.
  361.  
  362.    [WR] Weider, C., Preston, C., Simonsen, K., Alvestrand, H,
  363.         Atkinson, R., Crispin, M., and P. Svanberg, "The Report of the
  364.         IAB Character Set Workshop held 29 February - 1 March, 1996",
  365.         RFC 2130, April 1997.
  366.  
  367.    [RFC 1958]
  368.         Carpenter, B., "Architectural Principles of the Internet", RFC
  369.         1958, June 1996.
  370.  
  371.    [POSIX]
  372.         ISO/IEC 9945-2:1993 Information technology -- Portable Operating
  373.         System Interface (POSIX) -- Part 2: Shell and Utilities
  374.  
  375.    [REG]
  376.         Freed, N., and J. Postel, "IANA Charset Registration
  377.         Procedures", BCP 19, RFC 2278, January 1998.
  378.  
  379.    [UTF-8]
  380.         Yergeau, F., "UTF-8, a transformation format of ISO 10646", RFC
  381.         2279, January 1998.
  382.  
  383.    [BCP9]
  384.         Bradner, S., "The Internet Standards Process -- Revision 3," BCP
  385.         9, RFC 2026, October 1996.
  386.  
  387.  
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. Alvestrand               Best Current Practice                  [Page 7]
  395.  
  396. RFC 2277                     Charset Policy                 January 1998
  397.  
  398.  
  399. 9.  Author's Address
  400.  
  401.    Harald Tveit Alvestrand
  402.    UNINETT
  403.    P.O.Box 6883 Elgeseter
  404.    N-7002 TRONDHEIM
  405.    NORWAY
  406.  
  407.    Phone: +47 73 59 70 94
  408.    EMail: Harald.T.Alvestrand@uninett.no
  409.  
  410.  
  411.  
  412.  
  413.  
  414.  
  415.  
  416.  
  417.  
  418.  
  419.  
  420.  
  421.  
  422.  
  423.  
  424.  
  425.  
  426.  
  427.  
  428.  
  429.  
  430.  
  431.  
  432.  
  433.  
  434.  
  435.  
  436.  
  437.  
  438.  
  439.  
  440.  
  441.  
  442.  
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450. Alvestrand               Best Current Practice                  [Page 8]
  451.  
  452. RFC 2277                     Charset Policy                 January 1998
  453.  
  454.  
  455. 10.  Full Copyright Statement
  456.  
  457.    Copyright (C) The Internet Society (1998).  All Rights Reserved.
  458.  
  459.    This document and translations of it may be copied and furnished to
  460.    others, and derivative works that comment on or otherwise explain it
  461.    or assist in its implementation may be prepared, copied, published
  462.    and distributed, in whole or in part, without restriction of any
  463.    kind, provided that the above copyright notice and this paragraph are
  464.    included on all such copies and derivative works.  However, this
  465.    document itself may not be modified in any way, such as by removing
  466.    the copyright notice or references to the Internet Society or other
  467.    Internet organizations, except as needed for the purpose of
  468.    developing Internet standards in which case the procedures for
  469.    copyrights defined in the Internet Standards process must be
  470.    followed, or as required to translate it into languages other than
  471.    English.
  472.  
  473.    The limited permissions granted above are perpetual and will not be
  474.    revoked by the Internet Society or its successors or assigns.
  475.  
  476.    This document and the information contained herein is provided on an
  477.    "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
  478.    TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING
  479.    BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
  480.    HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF
  481.    MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
  482.  
  483.  
  484.  
  485.  
  486.  
  487.  
  488.  
  489.  
  490.  
  491.  
  492.  
  493.  
  494.  
  495.  
  496.  
  497.  
  498.  
  499.  
  500.  
  501.  
  502.  
  503.  
  504.  
  505.  
  506. Alvestrand               Best Current Practice                  [Page 9]
  507.  
  508.