📄 i18n.txt
字号:
Network Working Group Chris Newman
Internet-Draft Sun Microsystems
Intended Status: Proposed Standard Arnt Gulbrandsen
Oryx Mail Systems GmhH
Alexey Melnikov
Isode Limited
February 1, 2008
Internet Message Access Protocol Internationalization
draft-ietf-imapext-i18n-15.txt
Status of this Memo
By submitting this Internet-Draft, each author represents that any
applicable patent or other IPR claims of which he or she is aware
have been or will be disclosed, and any of which he or she becomes
aware will be disclosed, in accordance with Section 6 of BCP 79.
Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF), its areas, and its working groups. Note that
other groups may also distribute working documents as Internet-
Drafts.
Internet-Drafts are draft documents valid for a maximum of six
months and may be updated, replaced, or obsoleted by other documents
at any time. It is inappropriate to use Internet-Drafts as
reference material or to cite them other than as "work in progress".
The list of current Internet-Drafts can be accessed at
http://www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-
Draft Shadow Directories can be accessed at
http://www.ietf.org/shadow.html.
This Internet-Draft expires in August 2008.
Copyright Notice
Copyright (C) The IETF Trust (2008).
Abstract
Internet Message Access Protocol (IMAP) version 4rev1 has basic
support for non-ASCII characters in mailbox names and search
substrings. It also supports non-ASCII message headers and content
encoded as specified by Multipurpose Internet Mail Extensions
(MIME). This specification defines a collection of IMAP extensions
Newman & Co Expires August 2008 FF[Page 1]
Internet-draft February 2008
which improve international support including comparator negotiation
for search, sort and thread, language negotiation for international
error text, and translations for namespace prefixes.
Table of Contents
1. Conventions Used in this Document . . . . . . . . . . . . . . 2
2. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 3
3. LANGUAGE Extension . . . . . . . . . . . . . . . . . . . . . 3
3.1 LANGUAGE Extension Requirements . . . . . . . . . . . . . . . 3
3.2 LANGUAGE Command . . . . . . . . . . . . . . . . . . . . . . 4
3.3 LANGUAGE Response . . . . . . . . . . . . . . . . . . . . . . 6
3.4 TRANSLATION Extension to the NAMESPACE Response . . . . . . . 6
3.5 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . . 6
4. I18NLEVEL=1 and I18NLEVEL=2 Extensions . . . . . . . . . . . 7
4.1 Introduction and Overview . . . . . . . . . . . . . . . . . . 8
4.2 Requirements common to both I18NLEVEL=1 and I18NLEVEL=2 . . .
4.3 I18NLEVEL=1 Extension Requirements . . . . . . . . . . . . . 8
4.4 I18NLEVEL=2 Extension Requirements . . . . . . . . . . . . . 8
4.5 Compatibility Notes
4.6 Comparators and Charsets . . . . . . . . . . . . . . . . . . 9
4.7 COMPARATOR Command . . . . . . . . . . . . . . . . . . . . . 9
4.8 COMPARATOR Response . . . . . . . . . . . . . . . . . . . . . 10
4.9 BADCOMPARATOR Response Code . . . . . . . . . . . . . . . . .
4.10 Formal Syntax . . . . . . . . . . . . . . . . . . . . . . . 10
5. Other IMAP Internationalization Issues . . . . . . . . . . . 11
5.1 UTF-8 Userids and Passwords . . . . . . . . . . . . . . . . . 11
5.2 UTF-8 Mailbox Names . . . . . . . . . . . . . . . . . . . . . 11
5.3 UTF-8 Domains, Addresses and Mail Headers . . . . . . . . . . 11
6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 12
7. Security Considerations . . . . . . . . . . . . . . . . . . . 12
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 12
9. Relevant Standards for i18n IMAP Implementations . . . . . . 13
Normative References . . . . . . . . . . . . . . . . . . . . 13
Informative References . . . . . . . . . . . . . . . . . . . 14
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . 15
Intellectual Property and Copyright Statements . . . . . . . 16
Conventions Used in This Document
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in [RFC2119].
The formal syntax use the Augmented Backus-Naur Form (ABNF)
[RFC4234] notation including the core rules defined in Appendix A.
Newman & Co Expires August 2008 FF[Page 2]
Internet-draft February 2008
The UTF8-related productions are defined in [RFC3629].
In examples, "C:" and "S:" indicate lines sent by the client and
server respectively. If a single "C:" or "S:" label applies to
multiple lines, then the line breaks between those lines are for
editorial clarity only and are not part of the actual protocol
exchange.
2. Introduction
This specification defines two IMAP4rev1 [RFC3501] extensions to
enhance international support. These extensions can be advertised
and implemented separately.
The LANGUAGE extension allows the client to request a suitable
language for protocol error messages and in combination with the
NAMESPACE extension [RFC2342] enables namespace translations.
The I18NLEVEL=2 extension allows the client to request a suitable
collation which will modify the behavior of the base specification's
SEARCH command as well as the SORT and THREAD extensions [SORT].
This leverages the collation registry [RFC4790].
3. LANGUAGE Extension
IMAP allows server responses to include human-readable text that in
many cases needs to be presented to the user. But that text is
limited to US-ASCII by the IMAP specification [RFC3501] in order to
preserve backwards compatibility with deployed IMAP implementations.
This section specifies a way for an IMAP client to negotiate which
language the server should use when sending human-readable text.
The LANGUAGE extension only provides a mechanism for altering fixed
server strings such as response text and NAMESPACE folder names.
Assigning localized language aliases to shared mailboxes would be
done with a separate mechanism such as the proposed METADATA
extension (see [METADATA]).
3.1 LANGUAGE Extension Requirements
IMAP servers that support this extension MUST list the keyword
LANGUAGE in their CAPABILITY response as well as in the greeting
CAPABILITY data.
A server that advertises this extension MUST use the language "i-
Newman & Co Expires August 2008 FF[Page 3]
Internet-draft February 2008
default" as described in [RFC2277] as its default language until
another supported language is negotiated by the client. A server
MUST include "i-default" as one of its supported languages.
Clients and servers that support this extension MUST also support
the NAMESPACE extension [RFC2342].
The LANGUAGE command is valid in all states. Clients are urged to
issue LANGUAGE before authentication, since some servers send
valuable user information as part of authentication (e.g. "password
is correct, but expired"). If a security layer (such as SASL or
TLS) is subsequently negotiated by the client, it MUST re-issue the
LANGUAGE command in order to make sure that no previous active
attack (if any) on LANGUAGE negotiation has effect on subsequent
error messages. (See Section 7 for a more detailed explanation of
the attack.)
3.2 LANGUAGE Command
Arguments: Optional language range arguments.
Response: A possible LANGUAGE response (see section 3.3).
A possible NAMESPACE response (see section 3.4).
Result: OK - Command completed
NO - Could not complete command
BAD - arguments invalid
The LANGUAGE command requests that human-readable text emitted by
the server be localized to a language matching one of the language
range argument as described by section 2 of [RFC4647].
If the command succeeds, the server will return human-readable
responses in the first supported language specified. These
responses will be in UTF-8 [RFC3629]. The server MUST send a
LANGUAGE response specifying the language used, and the change takes
effect immediately after the LANGUAGE response.
If the command fails, the server continues to return human-readable
responses in the language it was previously using.
The special "default" language range argument indicates a request to
use a language designated as preferred by the server administrator.
The preferred language MAY vary based on the currently active user.
If a language range does not match a known language tag exactly but
Newman & Co Expires August 2008 FF[Page 4]
Internet-draft February 2008
does match a language by the rules of [RFC4647], the server MUST
send an untagged LANGUAGE response indicating the language selected.
If there aren't any arguments, the server SHOULD send an untagged
LANGUAGE response listing the languages it supports. If the server
is unable to enumerate the list of languages it supports it MAY
return a tagged NO response to the enumeration request.
< The server defaults to using English i-default responses until
the user explicitly changes the language. >
C: A001 LOGIN KAREN PASSWORD
S: A001 OK LOGIN completed
< Client requested MUL language, which no server supports. >
C: A002 LANGUAGE MUL
S: A002 NO Unsupported language MUL
< A LANGUAGE command with no arguments is a request to enumerate
the list of languages the server supports. >
C: A003 LANGUAGE
S: * LANGUAGE (EN DE IT i-default)
S: A003 OK Supported languages have been enumerated
C: B001 LANGUAGE
S: B001 NO Server is unable to enumerate supported languages
< Once the client changes the language, all responses will be in
that language starting after the LANGUAGE response. Note that
this includes the NAMESPACE response. Because RFCs are in US-
ASCII, this document uses an ASCII transcription rather than
UTF-8 text, e.g. ue in the word "ausgefuehrt" >
C: C001 LANGUAGE DE
S: * LANGUAGE (DE)
S: * NAMESPACE (("" "/")) (("Other Users/" "/" "TRANSLATION"
("Andere Ben&APw-tzer/"))) (("Public Folders/" "/"
"TRANSLATION" ("Gemeinsame Postf&AM8-cher/")))
S: C001 OK Sprachwechsel durch LANGUAGE-Befehl ausgefuehrt
< If a server does not support the requested primary language,
responses will continue to be returned in the current language
the server is using. >
C: D001 LANGUAGE FR
S: D001 NO Diese Sprache ist nicht unterstuetzt
Newman & Co Expires August 2008 FF[Page 5]
Internet-draft February 2008
C: D002 LANGUAGE DE-IT
S: * LANGUAGE (DE-IT)
S: * NAMESPACE (("" "/"))(("Other Users/" "/" "TRANSLATION"
("Andere Ben&APw-tzer/"))) (("Public Folders/" "/"
"TRANSLATION" ("Gemeinsame Postf&AM8-cher/")))
S: D002 OK Sprachwechsel durch LANGUAGE-Befehl ausgefuehrt
C: D003 LANGUAGE "default"
S: * LANGUAGE (DE)
S: D003 OK Sprachwechsel durch LANGUAGE-Befehl ausgefuehrt
< Server does not speak French, but does speak English. User
speaks Canadian French and Canadian English. >
C: E001 LANGUAGE FR-CA EN-CA
S: * LANGUAGE (EN)
S: E001 OK Now speaking English
3.3 LANGUAGE Response
Contents: A list of one or more language tags.
The LANGUAGE response occurs as a result of a LANGUAGE command. A
LANGUAGE response with a list containing a single language tag
indicates that the server is now using that language. A LANGUAGE
response with a list containing multiple language tags indicates the
server is communicating a list of available languages to the client,
and no change in the active language has been made.
3.4 TRANSLATION Extension to the NAMESPACE Response
If localized representations of the namespace prefixes are available
in the selected language, the server SHOULD include these in the
TRANSLATION extension to the NAMESPACE response.
The TRANSLATION extension to the NAMESPACE response returns a single
string, containing the modified UTF-7 [RFC3501] encoded translation
of the namespace prefix. It is the responsibility of the client to
convert between the namespace prefix and the translation of the
namespace prefix when presenting mailbox names to the user.
In this example a server supports the IMAP4 NAMESPACE command. It
uses no prefix to the user's Personal Namespace, a prefix of "Other
Users" to its Other Users' Namespace and a prefix of "Public
Folders" to its only Shared Namespace. Since a client will often
display these prefixes to the user, the server includes a
Newman & Co Expires August 2008 FF[Page 6]
Internet-draft February 2008
translation of them that can be presented to the user.
C: A001 LANGUAGE DE-IT
S: * NAMESPACE (("" "/")) (("Other Users/" "/" "TRANSLATION"
("Andere Ben&APw-tzer/"))) (("Public Folders/" "/"
"TRANSLATION" ("Gemeinsame Postf&AM8-cher/")))
S: A001 OK LANGUAGE-Befehl ausgefuehrt
3.5 Formal Syntax
The following syntax specification inherits ABNF [RFC4234] rules
from IMAP4rev1 [RFC3501], IMAP4 Namespace [RFC2342], Tags for the
Identifying Languages [RFC4646], UTF-8 [RFC3629] and Collected
Extensions to IMAP4 ABNF [RFC4466].
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -