|
|
ru.linux- RU.LINUX --------------------------------------------------------------------- From : Artem Chuprina 2:5020/400 21 Apr 2003 13:10:35 To : Valentin Nechayev Subject : Re: mutt -------------------------------------------------------------------------------- Здравствуй, Valentin Nechayev. VW>>>>> Имеет право. В RFC написано, что в Content-Type (а именно туда попадает VW>>>>> filename) русские буквы недопустимы. VN>>>> RFC2047-coded допустимы, и раскодировать и показать их он вполне может. VW>>> Разве? Мне так казалось, что именно в Content-Type недопустимы и VW>>> кодированные. Копаться в тексте RFC сейчас некогда. AC>> Там еще хитрее. Да, допустимы, да, кодированные, нет, не по RFC2047. Если я AC>> правильно ошибаюсь. VN> Что-то не вижу ни одного свидетельства такого варианта. VN> А вот аттачи с именами кодированными по RFC2047 - постоянно. Да, и большинство клиентов это едят. Однако An 'encoded-word' may appear in a message header or body part header according to the following rules: (1) An 'encoded-word' may replace a 'text' token (as defined by RFC 822) in any Subject or Comments header field, any extension message header field, or any MIME body part field for which the field body is defined as '*text'. An 'encoded-word' may also appear in any user-defined ("X-") message or body part header field. Ordinary ASCII text and 'encoded-word's may appear together in the same header field. However, an 'encoded-word' that appears in a header field defined as '*text' MUST be separated from any adjacent 'encoded-word' or 'text' by 'linear-white-space'. (2) An 'encoded-word' may appear within a 'comment' delimited by "(" and ")", i.e., wherever a 'ctext' is allowed. More precisely, the RFC 822 ABNF definition for 'comment' is amended as follows: comment = "(" *(ctext / quoted-pair / comment / encoded-word) ")" A "Q"-encoded 'encoded-word' which appears in a 'comment' MUST NOT contain the characters "(", ")" or " 'encoded-word' that appears in a 'comment' MUST be separated from any adjacent 'encoded-word' or 'ctext' by 'linear-white-space'. It is important to note that 'comment's are only recognized inside "structured" field bodies. In fields whose bodies are defined as '*text', "(" and ")" are treated as ordinary characters rather than comment delimiters, and rule (1) of this section applies. (See RFC 822, sections 3.1.2 and 3.1.3) (3) As a replacement for a 'word' entity within a 'phrase', for example, one that precedes an address in a From, To, or Cc header. The ABNF definition for 'phrase' from RFC 822 thus becomes: phrase = 1*( encoded-word / word ) In this case the set of characters that may be used in a "Q"-encoded 'encoded-word' is restricted to: <upper and lower case ASCII letters, decimal digits, "!", "*", "+", "-", "/", "=", and "_" (underscore, ASCII 95.)>. An 'encoded-word' that appears within a 'phrase' MUST be separated from any adjacent 'word', 'text' or 'special' by 'linear-white-space'. These are the ONLY locations where an 'encoded-word' may appear. In particular: + An 'encoded-word' MUST NOT appear in any portion of an 'addr-spec'. + An 'encoded-word' MUST NOT appear within a 'quoted-string'. + An 'encoded-word' MUST NOT be used in a Received header field. + An 'encoded-word' MUST NOT be used in parameter of a MIME Content-Type or Content-Disposition field, or in any structured field body except within a 'comment' or 'phrase'. То есть RFC 2047 такое поведение явно запрещает. А вот где было написано, как там можно кодировать, я не помню :-( -- Artem Chuprina RFC2822: <ran@ran.pp.ru>, FIDO: 2:5020/122.256, ICQ: 13038757 --- ifmail v.2.15dev5 * Origin: Leninsky 45 home network (2:5020/400) Вернуться к списку тем, сортированных по: возрастание даты уменьшение даты тема автор
Архивное /ru.linux/114772d1109f8.html, оценка из 5, голосов 10
|