Network Working Group                                           B. Lilly
Request for Comments: 4263                                  January 2006
Category: Informational
        
Network Working Group                                           B. Lilly
Request for Comments: 4263                                  January 2006
Category: Informational
        

Media Subtype Registration for Media Type text/troff

媒体类型text/troff的媒体子类型注册

Status of This Memo

关于下段备忘

This memo provides information for the Internet community. It does not specify an Internet standard of any kind. Distribution of this memo is unlimited.

本备忘录为互联网社区提供信息。它没有规定任何类型的互联网标准。本备忘录的分发不受限制。

Copyright Notice

版权公告

Copyright (C) The Internet Society (2006).

版权所有(C)互联网协会(2006年)。

Abstract

摘要

A text media subtype for tagging content consisting of juxtaposed text and formatting directives as used by the troff series of programs and for conveying information about the intended processing steps necessary to produce formatted output is described.

描述了一种文本媒体子类型,用于标记由troff系列程序使用的并置文本和格式化指令组成的内容,以及用于传递有关生成格式化输出所需的预期处理步骤的信息。

Table of Contents

目录

   1. Introduction...................................................  2
   2. Requirement Levels.............................................  3
   3. Scope of Specification.........................................  3
   4. Registration Form..............................................  3
   5. Acknowledgements...............................................  8
   6. Security Considerations........................................  8
   7. Internationalization Considerations............................  8
   8. IANA Considerations............................................  9
   Appendix A. Examples.............................................. 10
      A.1. Data Format............................................... 10
      A.2. Simple Diagram............................................ 11
   Appendix B. Disclaimers........................................... 12
   Normative References.............................................. 13
   Informative References............................................ 13
        
   1. Introduction...................................................  2
   2. Requirement Levels.............................................  3
   3. Scope of Specification.........................................  3
   4. Registration Form..............................................  3
   5. Acknowledgements...............................................  8
   6. Security Considerations........................................  8
   7. Internationalization Considerations............................  8
   8. IANA Considerations............................................  9
   Appendix A. Examples.............................................. 10
      A.1. Data Format............................................... 10
      A.2. Simple Diagram............................................ 11
   Appendix B. Disclaimers........................................... 12
   Normative References.............................................. 13
   Informative References............................................ 13
        
1. Introduction
1. 介绍

It is sometimes desirable to format text in a particular way for presentation. One approach is to provide formatting directives in juxtaposition to the text to be formatted. That approach permits reading the text in unformatted form (by ignoring the formatting directives), and it permits relatively simple repurposing of the text for different media by making suitable alterations to the formatting directives or the environment in which they operate. One particular series of related programs for formatting text in accordance with that model is often referred to generically as "troff", although that is also the name of a particular lineage of programs within that generic category for formatting text specifically for typesetter and typesetter-like devices. A related formatting program within the generic "troff" category, usually used for character-based output such as (formatted) plain text, is known as "nroff". For the purpose of the media type defined here, the entire category will be referred to simply by the generic "troff" name. Troff as a distinct set of programs first appeared in the early 1970s [N1.CSTR54], based on the same formatting approach used by some earlier programs ("runoff" and "roff"). It has been used to produce documents in various formats, ranging in length from short memoranda to books (including tables, diagrams, and other non-textual content). It remains in wide use as of the date of this document; this document itself was prepared using the troff family of tools per [I1.RFC2223] and [I2.Lilly05].

有时需要以一种特定的方式对文本进行格式化以供演示。一种方法是提供与要格式化的文本并列的格式化指令。这种方法允许以未格式化的形式读取文本(通过忽略格式化指令),并且通过对格式化指令或其操作环境进行适当的更改,允许相对简单地为不同的媒体重新调整文本的用途。根据该模型格式化文本的一系列特定相关程序通常被统称为“troff”,尽管这也是该通用类别中用于格式化文本的特定程序系列的名称,专门用于排字机和类似排字机的设备。通用“troff”类别中的相关格式化程序通常用于基于字符的输出,如(格式化的)纯文本,称为“nroff”。对于此处定义的媒体类型,整个类别将仅通过通用的“troff”名称来引用。Troff作为一组独特的程序最早出现在20世纪70年代早期[N1.CSTR54],它基于一些早期程序使用的相同格式方法(“径流”和“roff”)。它已被用于生成各种格式的文档,长度从短备忘录到书籍(包括表格、图表和其他非文本内容)。自本文件发布之日起,其仍在广泛使用;本文件本身是根据[I1.RFC2223]和[I2.Lilly05]使用troff系列工具编制的。

The basic format (juxtaposed text and formatting directives) is extensible and has been used for related formatting of text and graphical document content. Formating is usually controlled by a set of macros; a macro package is a set of related formatting tools, written in troff format (although compressed binary representations have also been used) and using basic formatting directives to extend and manage formatting capabilities for document authors. There are a number of preprocessors that transform a textual description of some content into the juxtaposed text and formatting directives necessary to produce some desired output. Preprocessors exist for formatting of tables of text and non-textual material, mathematical equations, chemical formulae, general line drawings, graphical representation of data (in plotted coordinate graphs, bar charts, etc.), representations of data formats, and representations of the abstract mathematical construct known as a graph (consisting of nodes and edges). Many such preprocessors use the same general type of input format as the formatters, and such input is explicitly within the scope of the media type described in this document.

基本格式(并置文本和格式化指令)是可扩展的,并已用于文本和图形文档内容的相关格式化。格式化通常由一组宏控制;宏包是一组相关的格式化工具,以troff格式编写(尽管也使用了压缩二进制表示),并使用基本格式化指令扩展和管理文档作者的格式化功能。有许多预处理器可以将某些内容的文本描述转换为生成所需输出所需的并列文本和格式化指令。预处理器用于格式化文本和非文本材料表、数学方程、化学公式、一般线条图、数据的图形表示(在绘制的坐标图、条形图等中)、数据格式表示和抽象数学结构(称为图形)表示(由节点和边组成)。许多这样的预处理器使用与格式化程序相同的一般类型的输入格式,并且这种输入明确地在本文档中描述的媒体类型的范围内。

2. Requirement Levels
2. 需求水平

The key words "MUST", "MUST NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document are to be interpreted as described in [N2.BCP14].

本文件中的关键词“必须”、“不得”、“应该”、“不应该”、“建议”和“可能”应按照[N2.BCP14]中所述进行解释。

3. Scope of Specification
3. 规格范围

The described media type refers to input that may be processed by preprocessors and by a page formatter. It is intended to be used where content has some text that may be comprehensible (either as text per se or as a readable description of non-text content) without machine processing of the content. Where there is little or no comprehensible text content, this media type SHOULD NOT be used. For example, while output of the "pic" preprocessor certainly consists of troff-compatible sequences of formatting directives, the sheer number of individual directives interspersed with any text that might be present makes comprehension difficult, whereas the preprocessor input language (as described in the "Published Specification" section of the registration below) may provide a concise and comprehensible description of graphical content. Preprocessor output that includes a large proportion of formatting directives would best be labeled as a subtype of the application media type. If particular preprocessor input content describes only graphical content with little or no text, and which is not readily comprehensible from a textual description of the graphical elements, a subtype of the image media type would be appropriate. The purpose of labeling media content is to provide information about that content to facilitate use of the content. Use of a particular label requires some common sense and judgment, and SHOULD NOT be mechanically applied to content in the absence of such judgment.

所描述的媒体类型是指可由预处理器和页面格式化程序处理的输入。它旨在用于内容中有一些文本可以理解(作为文本本身或作为非文本内容的可读描述)而无需对内容进行机器处理的情况。如果很少或没有可理解的文本内容,则不应使用此媒体类型。例如,虽然“pic”预处理器的输出肯定由troff兼容的格式化指令序列组成,但由于存在大量散布在文本中的指令,理解起来很困难,而预处理器的输入语言(如“已发布规范”中所述)以下注册部分)可提供图形内容的简明易懂的描述。包含大量格式化指令的预处理器输出最好标记为应用程序媒体类型的子类型。如果特定预处理器输入内容仅描述很少或没有文本的图形内容,并且不容易从图形元素的文本描述中理解,则图像媒体类型的子类型将是合适的。为媒体内容添加标签的目的是提供有关该内容的信息,以便于使用该内容。使用特定标签需要一些常识和判断,在没有此类判断的情况下,不应机械地应用于内容。

4. Registration Form
4. 登记表

The registration procedure and form are specified in [I3.RFC4288].

[I3.RFC4288]中规定了注册程序和形式。

Type name: text

类型名称:text

Subtype name: troff

子类型名称:troff

Required parameters: none

所需参数:无

Optional parameters:

可选参数:

charset: Must be a charset registered for use with MIME text types [N3.RFC2046], except where transport protocols are explicitly exempted from that restriction. Specifies the charset of the media content. With traditional source content, this will be

字符集:必须是注册用于MIME文本类型[N3.RFC2046]的字符集,除非传输协议明确免除该限制。指定媒体内容的字符集。对于传统的源内容,这将是

the default "US-ASCII" charset. Some recent versions of troff processing software can handle Unicode input charsets; however, there may be interoperability issues if the input uses such a charset (see "Interoperability considerations" below).

默认的“US-ASCII”字符集。一些最新版本的troff处理软件可以处理Unicode输入字符集;但是,如果输入使用这样的字符集,则可能存在互操作性问题(请参阅下面的“互操作性注意事项”)。

process: Human-readable additional information for formatting, including environment variables, preprocessor arguments and order, formatter arguments, and postprocessors. The parameter value may need to be quoted or encoded as provided for by [N4.RFC2045] as amended by [N5.RFC2231] and [N6.Errata]. Generating implementations must not encode executable content and other implementations must not attempt any execution or other interpretation of the parameter value, as the parameter value may be prose text. Implementations SHOULD present the parameter (after reassembly of continuation parameters, etc.) as information related to the media type, particularly if the media content is not immediately available (e.g., as with message/external-body composite media [N3.RFC2046]).

进程:用于格式化的人类可读的附加信息,包括环境变量、预处理器参数和顺序、格式化程序参数和后处理器。可能需要按照[N4.RFC2045]以及[N5.RFC2231]和[N6.勘误表]修订的规定引用或编码参数值。生成实现不得对可执行内容进行编码,其他实现不得尝试对参数值进行任何执行或其他解释,因为参数值可能是散文文本。实现应将参数(在重新组合延续参数等之后)作为与媒体类型相关的信息呈现,特别是当媒体内容不能立即可用时(例如,与消息/外部主体复合媒体[N3.RFC2046])。

resources: Lists any additional files or programs that are required for formatting (e.g., via .cf, .nx, .pi, .so, and/or .sy directives).

参考资料:列出格式化所需的任何其他文件或程序(例如,通过.cf、.nx、.pi、.so和/或.sy指令)。

versions: Human-readable indication of any known specific versions of preprocessors, formatter, macro packages, postprocessors, etc., required to process the content.

版本:处理内容所需的预处理器、格式化程序、宏包、后处理器等的任何已知特定版本的可读指示。

Encoding considerations:

编码注意事项:

7bit is adequate for traditional troff provided line endings are canonicalized per [N3.RFC2046]. Transfer of this media type content via some transport mechanisms may require or benefit from encoding into a 7bit range via a suitable encoding method such as the ones described in [N4.RFC2045]. In particular, some lines in this media type might begin or end with whitespace, and that leading and/or trailing whitespace might be discarded or otherwise mangled if the media type is not encoded for transport.

7如果根据[N3.RFC2046]对线端进行规范化,则其适用于传统的troff。通过某些传输机制传输此媒体类型的内容可能需要或受益于通过合适的编码方法(如[N4.RFC2045]中所述)编码到7比特范围。特别是,此媒体类型中的某些行可能以空格开头或结尾,如果媒体类型未进行传输编码,则前导和/或尾随空格可能会被丢弃或损坏。

8bit may be used with Unicode characters represented as a series of octets using the utf-8 charset [I4.RFC3629], where transport methods permit 8bit content and where content line length is suitable. Transport encoding considerations for robustness may also apply, and if a suitable 8bit encoding mechanism is standardized, it might be applicable for protection of media during transport.

在传输方法允许8bit内容且内容行长度合适的情况下,8bit可与使用utf-8字符集[I4.RFC3629]表示为一系列八位字节的Unicode字符一起使用。传输编码对健壮性的考虑也可能适用,如果适当的8位编码机制标准化,则可能适用于传输期间的媒体保护。

binary may be necessary when raw Unicode is used or where line lengths exceed the allowable maximum for 7bit and 8bit content [N4.RFC2045], and may be used in environments (e.g., HTTP [I5.RFC2616]) where Unicode characters may be transferred via a non-MIME charset such as UTF-16 [I6.RFC2781].

当使用原始Unicode时,或当行长度超过7位和8位内容允许的最大值[N4.RFC2045]时,二进制可能是必需的,并且可以在Unicode字符可以通过非MIME字符集(如UTF-16[I6.RFC2781])传输的环境中使用(例如HTTP[I5.RFC2616])。

framed encoding MAY be used, but is not required and is not generally useful with this media type.

可以使用帧编码,但不是必需的,并且通常不适用于这种媒体类型。

Restrictions on usage: none

使用限制:无

Security considerations: Some troff directives (.sy and .pi) can cause arbitrary external programs to be run. Several troff directives (.so, .nx, and .cf) may read external files (and/or devices on systems that support device input via file system semantics) during processing. Several preprocessors have similar features. Some implementations have a "safe" mode that disables some of these features. Formatters and preprocessors are programmable, and it is possible to provide input which specifies an infinite loop, which could result in denial of service, even in implementations that restrict use of directives that access external resources. Users of this media type SHOULD be vigilant of the potential for damage that may be caused by careless processing of media obtained from untrusted sources.

安全注意事项:某些troff指令(.sy和.pi)可能导致运行任意外部程序。在处理过程中,几个troff指令(.so、.nx和.cf)可能会读取外部文件(和/或支持通过文件系统语义进行设备输入的系统上的设备)。几个预处理器具有相似的特性。一些实现具有“安全”模式,可以禁用其中一些功能。格式化程序和预处理器是可编程的,可以提供指定无限循环的输入,这可能导致拒绝服务,即使在限制使用访问外部资源的指令的实现中也是如此。这种媒体类型的用户应警惕不小心处理从不可信来源获得的媒体可能造成的损害。

Processing of this media type other than by facilities that strip or ignore potentially dangerous directives, and processing by preprocessors and/or postprocessors, SHOULD NOT be invoked automatically (i.e., without user confirmation). In some cases, as this is a text media type (i.e., it contains text that is comprehensible without processing), it may be sufficient to present the media type with no processing at all. However, like any other text media, this media type may contain control characters, and implementers SHOULD take precautions against untoward consequences of sending raw control characters to display devices.

除剥离或忽略潜在危险指令的设施外,不应自动调用此媒体类型的处理以及预处理器和/或后处理器的处理(即,未经用户确认)。在某些情况下,由于这是一种文本媒体类型(即,它包含无需处理即可理解的文本),因此在不进行任何处理的情况下呈现媒体类型就足够了。但是,与任何其他文本媒体一样,此媒体类型可能包含控制字符,实现人员应采取预防措施,防止将原始控制字符发送到显示设备的不良后果。

Users of this media type SHOULD carefully scrutinize suggested command lines associated with the "process" parameter, contained in comments within the media, or conveyed via external mechanisms, both for attempts at social engineering and for the effects of ill-considered values of the parameter. While some implementations may have "safe" modes, those using this media type MUST NOT presume that they are available or active.

这种媒体类型的用户应仔细检查与“流程”参数相关的建议命令行,这些命令行包含在媒体内的评论中,或通过外部机制传达,无论是尝试社会工程还是考虑不周的参数值的影响。虽然某些实现可能具有“安全”模式,但使用此媒体类型的实现不能假定它们可用或处于活动状态。

Comments may be included in troff source; comments are not formatted for output. However, they are of course readable in the troff document source. Authors should be careful about

评论可能包含在troff来源中;注释的格式不适合输出。但是,它们在troff文档源中当然是可读的。作者应该注意

information placed in comments, as such information may result in a leak of information, or may have other undesirable consequences.

注释中的信息,因为此类信息可能导致信息泄漏,或可能产生其他不良后果。

While it is possible to overlay text with graphics or otherwise produce formatting instructions that would visually obscure text when formatted, such measures do not prevent extracting text from the document source, and might be ineffective in obscuring text when formatted electronically, e.g., as PostScript or PDF.

虽然可以用图形覆盖文本,或者生成格式化指令,在格式化时会在视觉上模糊文本,但这些措施不会阻止从文档源中提取文本,并且在以电子方式(例如PostScript或PDF)格式化时,在模糊文本方面可能无效。

Interoperability considerations: Recent implementations of formatters, macro packages, and preprocessors may include some extended capabilities that are not present in earlier implementations. Use of such extensions obviously limits the ability to produce consistent formatted output at sites with implementations that do not support those extensions. Use of any such extensions in a particular document using this media type SHOULD be indicated via the "versions" parameter value.

互操作性注意事项:格式化程序、宏包和预处理器的最新实现可能包括一些早期实现中不存在的扩展功能。使用这些扩展显然限制了在不支持这些扩展的实现的站点上生成一致格式输出的能力。应通过“版本”参数值指示在使用此媒体类型的特定文档中使用任何此类扩展。

As mentioned in the Introduction, macro packages are troff documents, and their content may be subject to copyright. That has led to multiple independent implementations of macro packages, which may exhibit gross or subtle differences with some content.

如引言中所述,宏包是troff文档,其内容可能受版权保护。这导致了宏包的多个独立实现,这些宏包可能与某些内容存在显著或细微的差异。

Some preprocessors or postprocessors might be unavailable at some sites. Where some implementation is available, there may be differences in implementation that affect the output produced. For example, some versions of the "pic" preprocessor provide the capability to fill a bounded graphical object; others lack that capability. Of those that support that feature, there are differences in whether a solid fill is represented by a value of 0.0 vs. 1.0. Some implementations support only gray-scale output; others support color.

某些站点可能无法使用某些预处理器或后处理器。在某些实现可用的情况下,可能存在影响生成的输出的实现差异。例如,“pic”预处理器的某些版本提供了填充有界图形对象的功能;其他国家则缺乏这种能力。在支持该功能的选项中,实体填充是否由0.0和1.0的值表示存在差异。一些实现只支持灰度输出;其他人支持颜色。

Preprocessors or postprocessors may depend on additional programs such as awk, and implementation differences (including bugs) may lead to different results on different systems (or even on the same system with a different environment).

预处理器或后处理器可能依赖于其他程序,如awk,而实现差异(包括错误)可能会导致不同系统(甚至是具有不同环境的同一系统)上的不同结果。

There is a wide variation in the capabilities of various presentation media and the devices used to prepare content for presentation. Indeed, that is one reason that there are two basic formatter program types (nroff for output where limited formatting control is available, and troff where a greater range of control is possible). Clearly, a document designed to use complex or sophisticated formatting might not be representable in simpler media or with devices lacking certain capabilities. Often it is possible to produce a somewhat inferior approximation; colors might be represented as gray-scale values, accented characters

各种演示媒体和用于准备演示内容的设备的功能有很大差异。事实上,这就是有两种基本格式化程序类型的原因之一(nroff用于有限格式控制可用的输出,而troff用于更大范围的控制)。显然,设计为使用复杂或复杂格式的文档可能无法用更简单的媒体或缺少某些功能的设备表示。通常可能会产生一个稍差的近似值;颜色可以表示为灰度值、重音字符

might be produced by overstriking, italics might be represented by underlining, etc.

斜体字可以用下划线等表示。

Various systems store text with different line ending codings. For the purpose of transferring this media type between systems or between applications using MIME methods, line endings MUST use the canonical CRLF line ending per [N3.RFC2046].

不同的系统存储具有不同行尾编码的文本。为了使用MIME方法在系统之间或应用程序之间传输此媒体类型,行尾必须按照[N3.RFC2046]使用规范的CRLF行尾。

Published specification: [N1.CSTR54]

已发布规范:[N1.CSTR54]

Applications which use this media type: The following applications in each sub-category are examples. The lists are not intended to be exhaustive.

使用此媒体类型的应用程序:每个子类别中的以下应用程序都是示例。这些清单并非详尽无遗。

Preprocessors: tbl [I7.CSTR49], grap [I8.CSTR114], pic [I9.CSTR116], chem [I10.CSTR122], eqn [I11.eqn], dformat [I12.CSTR142]

预处理器:tbl[I7.CSTR49]、grap[I8.CSTR114]、pic[I9.CSTR116]、chem[I10.CSTR122]、eqn[I11.eqn]、dformat[I12.CSTR142]

Formatters: troff, nroff, Eroff, sqtroff, groff, awf, cawf

格式化程序:troff、nroff、Eroff、sqtroff、groff、awf、cawf

Format converters: deroff, troffcvt, unroff, troff2html, mm2html

格式转换器:deroff、troffcvt、unroff、troff2html、mm2html

Macro packages: man [I13.UNIXman1], me [I14.me], mm [I15.DWBguide], ms [I16.ms], mv [I15.DWBguide], rfc [I2.Lilly05]

宏包:man[I13.UNIXman1]、me[I14.me]、mm[I15.DWBguide]、ms[I16.ms]、mv[I15.DWBguide]、rfc[I2.Lilly05]

Additional information:

其他信息:

Magic number(s): None; however, the content format is distinctive (see "Published specification").

幻数:无;但是,内容格式是独特的(参见“发布的规范”)。

File extension(s): Files do not require any specific "extension". Many are in use as a convenience for mechanized processing of files, some associated with specific macro packages or preprocessors; others are ad hoc. File names are orthogonal to the nature of the content. In particular, while a file name or a component of a name may be useful in some types of automated processing of files, the name or component might not be capable of indicating subtleties such as proportion of textual (as opposed to image or formatting directive) content. This media type SHOULD NOT be assigned a relationship with any file "extension" where content may be untrusted unless there is provision for human judgment that may be used to override that relationship for individual files. Where appropriate, a file name MAY be suggested by a suitable mechanism such as the one specified in [I17.RFC2183] as amended by [N5.RFC2231] and [N6.Errata].

文件扩展名:文件不需要任何特定的“扩展名”。许多是为了方便文件的机械化处理而使用的,有些与特定的宏包或预处理器相关;其他则是临时性的。文件名与内容的性质正交。特别是,虽然文件名或名称的组件在某些类型的文件自动处理中可能有用,但名称或组件可能无法指示文本(与图像或格式化指令相反)内容的比例等细微之处。如果内容可能不可信,则不应为该媒体类型分配与任何文件“扩展名”的关系,除非提供了可用于覆盖单个文件关系的人工判断。在适当的情况下,可通过适当的机制建议文件名,如经[N5.RFC2231]和[N6.勘误表]修订的[I17.RFC2183]中规定的机制。

Macintosh File Type Code(s): unknown

Macintosh文件类型代码:未知

Person & email address to contact for further information: Bruce Lilly blilly@erols.com

联系人和电子邮件地址,以获取更多信息:Bruce Lillyblilly@erols.com

Intended usage: COMMON

预期用途:普通

Author/Change controller: IESG

作者/变更控制员:IESG

Consistency: The media has provision for comments; these are sometimes used to convey recommended processing commands, to indicate required resources, etc. To avoid confusing recipients, senders SHOULD ensure that information specified in optional parameters is consistent with any related information that may be contained within the media content.

一致性:媒体提供评论;这些有时用于传达建议的处理命令、指示所需资源等。为避免混淆收件人,发件人应确保可选参数中指定的信息与媒体内容中可能包含的任何相关信息一致。

5. Acknowledgements
5. 致谢

The author would like to acknowledge the helpful comments provided by members of the ietf-types mailing list.

作者希望感谢ietf类型邮件列表成员提供的有用意见。

6. Security Considerations
6. 安全考虑

Security considerations are discussed in the media registration. Additional considerations may apply when the media subtype is used in some contexts (e.g., MIME [I18.RFC2049]).

媒体注册中讨论了安全注意事项。在某些上下文中使用媒体子类型(例如MIME[I18.rfc249])时,可能需要考虑其他因素。

7. Internationalization Considerations
7. 国际化考虑

The optional charset parameter may be used to indicate the charset of the media type content. In some cases, that content's charset might be carried through processing for display of text. In other cases, combinations of octets in particular sequences are used to represent glyphs that cannot be directly represented in the content charset. In either of those categories, the language(s) of the text might not be evident from the character content, and it is RECOMMENDED that a suitable mechanism (e.g., [I19.RFC3282]) be used to convey text language where such a mechanism is available [I20.BCP18]. Where multiple languages are used within a single document, it may be necessary or desirable to indicate the languages to readers directly via explicit indication of language in the content. In still other cases, the media type content (while readable and comprehensible in text form) represents symbolic or graphical information such as mathematical equations or chemical formulae, which are largely global and language independent.

可选字符集参数可用于指示媒体类型内容的字符集。在某些情况下,该内容的字符集可能会通过处理来显示文本。在其他情况下,特定序列中的八位字节组合用于表示无法在内容字符集中直接表示的字形。在这两个类别中,文本的语言可能从字符内容中看不明显,建议使用合适的机制(例如[I19.RFC3282])来传达文本语言,如果这种机制可用[I20.BCP18]。如果在单个文档中使用多种语言,则可能需要或希望通过内容中明确的语言指示直接向读者指示语言。在另一些情况下,媒体类型的内容(虽然文本形式可读且可理解)表示符号或图形信息,如数学方程或化学公式,这些信息基本上是全局性的,与语言无关。

8. IANA Considerations
8. IANA考虑

IANA shall enter and maintain the registration information in the media type registry as directed by the IESG.

IANA应按照IESG的指示,在媒体类型注册表中输入并维护注册信息。

Appendix A. Examples
附录A.示例
A.1. Data Format
A.1. 数据格式

The input:

输入:

      Content-Type: text/troff ; process="dformat | pic -n | troff -ms"
        
      Content-Type: text/troff ; process="dformat | pic -n | troff -ms"
        

Here's what an IP packet header looks like:

以下是IP数据包头的外观:

.begin dformat style fill off style bitwid 0.20 style recspread 0 style recht 0.33333 noname 0-3 \0Version 4-7 IHL 8-15 \0Type of Service 16-31 Total Length noname 0-15 Identification 16-18 \0Flags 19-31 Fragment Offset noname 0-7 Time to Live 8-15 Protocol 16-31 Header Checksum noname 0-31 Source Address noname 0-31 Destination Address noname 0-23 Options 24-31 Padding .end

.begin dformat style fill of style bitwid 0.20 style RECSPLAND 0 style recht 0.33333 noname 0-3\0版本4-7 IHL 8-15\0服务类型16-31总长度noname 0-15标识16-18\0标志19-31片段偏移noname 0-7生存时间8-15协议16-31头校验和noname 0-31源地址noname 0-31目标地址noname0-23选项24-31填充。结束

produces as output:

作为输出生成:

Here's what an IP packet header looks like:

以下是IP数据包头的外观:

   +-------+-------+---------------+-------------------------------+
   |Version| IHL   |Type of Service|         Total Length          |
   0------34------78-------------1516----+-----------------------31+
   |        Identification         |Flags|    Fragment Offset      |
   0---------------+-------------1516--1819----------------------31+
   | Time to Live  |   Protocol    |       Header Checksum         |
   0--------------78-------------1516----------------------------31+
   |                        Source Address                         |
   0-------------------------------------------------------------31+
   |                     Destination Address                       |
   0-----------------------------------------------+-------------31+
   |                   Options                     |   Padding     |
   0---------------------------------------------2324------------31+
        
   +-------+-------+---------------+-------------------------------+
   |Version| IHL   |Type of Service|         Total Length          |
   0------34------78-------------1516----+-----------------------31+
   |        Identification         |Flags|    Fragment Offset      |
   0---------------+-------------1516--1819----------------------31+
   | Time to Live  |   Protocol    |       Header Checksum         |
   0--------------78-------------1516----------------------------31+
   |                        Source Address                         |
   0-------------------------------------------------------------31+
   |                     Destination Address                       |
   0-----------------------------------------------+-------------31+
   |                   Options                     |   Padding     |
   0---------------------------------------------2324------------31+
        
A.2. Simple Diagram
A.2. 简图

The input:

输入:

      Content-Type: text/troff ; process="use pic -n then troff -ms"
        
      Content-Type: text/troff ; process="use pic -n then troff -ms"
        

The SMTP design can be pictured as:

SMTP设计图如下所示:

      .DS B
      .PS
      boxwid = 0.8
      # arrow approximation that looks acceptable in troff and nroff
      define myarrow X A: [ move right 0.055;\
       "<" ljust;line right ($1 - 0.1);">" rjust;\
       move right 0.045 ]\
      X
      User: box ht 0.333333 "User"
      FS: box ht 0.666667 "File" "System" with .n at User.s -0, 0.333333
      Client: box ht 1.333333 wid 1.1 "Client\-" "SMTP" \
       with .sw at FS.se +0.5, 0
      "SMTP client" rjust at Client.se -0, 0.166667
      move to User.e ; myarrow(0.5)
      move to FS.e ; myarrow(0.5)
      move to Client.e ; SMTP: myarrow(1.8)
      Server: box ht 1.333333 wid 1.1 "Server\-" "SMTP" \
       with .sw at Here.x, Client.s.y
      box invis ht 0.5 "SMTP" "Commands/Replies" with .s at SMTP.c
      box invis ht 0.25 "and Mail" with .n at SMTP.c
      "SMTP server" ljust at Server.sw -0, 0.166667
      move to Server.e.x, FS.e.y ; myarrow(0.5)
      FS2: box ht 0.666667 "File" "System" \
       with .sw at Server.se.x +0.5, FS.s.y
      .PE
      .DE
        
      .DS B
      .PS
      boxwid = 0.8
      # arrow approximation that looks acceptable in troff and nroff
      define myarrow X A: [ move right 0.055;\
       "<" ljust;line right ($1 - 0.1);">" rjust;\
       move right 0.045 ]\
      X
      User: box ht 0.333333 "User"
      FS: box ht 0.666667 "File" "System" with .n at User.s -0, 0.333333
      Client: box ht 1.333333 wid 1.1 "Client\-" "SMTP" \
       with .sw at FS.se +0.5, 0
      "SMTP client" rjust at Client.se -0, 0.166667
      move to User.e ; myarrow(0.5)
      move to FS.e ; myarrow(0.5)
      move to Client.e ; SMTP: myarrow(1.8)
      Server: box ht 1.333333 wid 1.1 "Server\-" "SMTP" \
       with .sw at Here.x, Client.s.y
      box invis ht 0.5 "SMTP" "Commands/Replies" with .s at SMTP.c
      box invis ht 0.25 "and Mail" with .n at SMTP.c
      "SMTP server" ljust at Server.sw -0, 0.166667
      move to Server.e.x, FS.e.y ; myarrow(0.5)
      FS2: box ht 0.666667 "File" "System" \
       with .sw at Server.se.x +0.5, FS.s.y
      .PE
      .DE
        

produces as output:

作为输出生成:

The SMTP design can be pictured as:

SMTP设计图如下所示:

   +-------+    +----------+                 +----------+
   | User  |<-->+          |                 |          |
   +-------+    |          |      SMTP       |          |
                |          |Commands/Replies |          |
   +-------+    | Client-  |<--------------->+ Server-  |    +-------+
   |       |    |  SMTP    |    and Mail     |  SMTP    |    |       |
   | File  |<-->+          |                 |          |<-->+ File  |
   |System |    |          |                 |          |    |System |
   +-------+    +----------+                 +----------+    +-------+
                SMTP client                  SMTP server
        
   +-------+    +----------+                 +----------+
   | User  |<-->+          |                 |          |
   +-------+    |          |      SMTP       |          |
                |          |Commands/Replies |          |
   +-------+    | Client-  |<--------------->+ Server-  |    +-------+
   |       |    |  SMTP    |    and Mail     |  SMTP    |    |       |
   | File  |<-->+          |                 |          |<-->+ File  |
   |System |    |          |                 |          |    |System |
   +-------+    +----------+                 +----------+    +-------+
                SMTP client                  SMTP server
        
Appendix B. Disclaimers
附录B.免责声明

This document has exactly one (1) author.

本文件只有一(1)名作者。

In spite of the fact that the author's given name may also be the surname of other individuals, and the fact that the author's surname may also be a given name for some females, the author is, and has always been, male.

尽管提交人的名字也可能是其他个人的姓氏,而且提交人的姓氏也可能是一些女性的名字,但提交人是男性,而且一直是男性。

The presence of "/SHE", "their", and "authors" (plural) in the boilerplate sections of this document is irrelevant. The author of this document is not responsible for the boilerplate text.

本文件样板部分中的“/她”、“他们的”和“作者”(复数)与此无关。本文件的作者不对样板文本负责。

Comments regarding the silliness, lack of accuracy, and lack of precision of the boilerplate text should be directed to the IESG, not to the author.

有关样板文本愚蠢、不准确和不准确的评论应提交给IESG,而不是提交给作者。

Normative References

规范性引用文件

[N1.CSTR54] Ossanna, Joseph F., "NROFF/TROFF User's Manual", Computing Science Technical Report No.54, Bell Laboratories, Murray Hill, New Jersey, 1976.

[N1.CSTR54]Ossanna,Joseph F.,“NROFF/TROFF用户手册”,计算科学技术报告第54号,贝尔实验室,新泽西州默里山,1976年。

[N2.BCP14] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997.

[N2.BCP14]Bradner,S.,“RFC中用于表示需求水平的关键词”,BCP 14,RFC 2119,1997年3月。

[N3.RFC2046] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Two: Media Types", RFC 2046, November 1996.

[N3.RFC2046]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第二部分:媒体类型”,RFC 20461996年11月。

[N4.RFC2045] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part One: Format of Internet Message Bodies", RFC 2045, November 1996.

[N4.RFC2045]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第一部分:Internet邮件正文格式”,RFC 20451996年11月。

[N5.RFC2231] Freed, N. and K. Moore, "MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations", RFC 2231, November 1997.

[N5.RFC2231]Freed,N.和K.Moore,“MIME参数值和编码字扩展:字符集、语言和连续体”,RFC 22311997年11月。

   [N6.Errata]    RFC-Editor errata page,
                  http://www.rfc-editor.org/errata.html
        
   [N6.Errata]    RFC-Editor errata page,
                  http://www.rfc-editor.org/errata.html
        

Informative References

资料性引用

[I1.RFC2223] Postel, J. and J. Reynolds, "Instructions to RFC Authors", RFC 2223, October 1997.

[I1.RFC2223]Postel,J.和J.Reynolds,“RFC作者须知”,RFC 2223,1997年10月。

[I2.Lilly05] Lilly, B., "Writing Internet-Drafts and Requests For Comments using troff and nroff", Work in Progress, May 2005.

[I2.Lilly05]Lilly,B.,“使用troff和nroff编写互联网草稿和征求意见”,正在进行的工作,2005年5月。

[I3.RFC4288] Freed, N. and J. Klensin, "Media Type Specifications and Registration Procedures", BCP 13, RFC 4288, December 2005.

[I3.RFC4288]Freed,N.和J.Klensin,“介质类型规范和注册程序”,BCP 13,RFC 4288,2005年12月。

[I4.RFC3629] Yergeau, F., "UTF-8, a transformation format of ISO 10646", STD 63, RFC 3629, November 2003.

[I4.RFC3629]Yergeau,F.,“UTF-8,ISO 10646的转换格式”,STD 63,RFC 3629,2003年11月。

[I5.RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H., Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999.

[I5.RFC2616]菲尔丁,R.,盖蒂斯,J.,莫卧儿,J.,弗莱斯蒂克,H.,马斯特,L.,利奇,P.,和T.伯纳斯·李,“超文本传输协议——HTTP/1.1”,RFC 2616,1999年6月。

[I6.RFC2781] Hoffman, P. and F. Yergeau, "UTF-16, an encoding of ISO 10646", RFC 2781, February 2000.

[I6.RFC2781]Hoffman,P.和F.Yergeau,“UTF-16,ISO 10646编码”,RFC 2781,2000年2月。

[I7.CSTR49] Lesk, M. E., "TBL - A Program for Setting Tables", Bell Laboratories Computing Science Technical Report #49, Murray Hill, New Jersey, 1976.

[I7.CSTR49]Lesk,M.E.,“TBL-设置表格的程序”,贝尔实验室计算科学技术报告#49,新泽西州默里山,1976年。

[I8.CSTR114] Bentley, Jon L. and Kernighan, Brian W., "Grap - A Language for Typesetting Graphs Tutorial and User Manual", Computing Science Technical Report No.114, AT&T Bell Laboratories, Murray Hill, New Jersey, 1991.

[I8.CSTR114]Bentley,Jon L.和Kernighan,Brian W.,“图形-排版图形的语言教程和用户手册”,计算科学技术报告第114号,美国电话电报公司贝尔实验室,新泽西州默里山,1991年。

[I9.CSTR116] Kernighan, Brian W., "Pic - A Graphics Language for Typesetting User Manual", Computing Science Technical Report No.116, AT&T Bell Laboratories, Murray Hill, New Jersey, 1991.

[I9.CSTR116]Kernighan,Brian W.,“Pic-排版用图形语言用户手册”,计算科学技术报告第116号,美国电话电报公司贝尔实验室,新泽西州默里山,1991年。

[I10.CSTR122] Bentley, Jon L., Jelinski, Lynn W., and Kernighan, Brian W., "Chem - A Program for Typesetting Chemical Diagrams: User Manual", Computing Science Technical Report No.122, AT&T Bell Laboratories, Murray Hill, New Jersey, 1992.

[I10.CSTR122]Bentley,Jon L.,Jelinski,Lynn W.,和Kernighan,Brian W.,“化学-排版化学图程序:用户手册”,计算科学技术报告第122号,美国电话电报公司贝尔实验室,新泽西州默里山,1992年。

[I11.eqn] Kernighan, Brian W, and Cherry, Lorinda L., "A System for Typesetting Mathematics", Communications of the ACM 18, 182-193, 1975.

[I11.eqn]Kernighan,Brian W,和Cherry,Lorinda L.,“排版数学系统”,ACM通信,18182-1931975年。

[I12.CSTR142] Bentley, Jon L. "DFORMAT - A Program for Typesetting Data Formats", Computing Science Technical Report No.142, AT&T Bell Laboratories, Murray Hill, New Jersey, 1988.

[I12.CSTR142]Bentley,Jon L.“数据格式-排版数据格式程序”,计算科学技术报告第142号,美国电话电报公司贝尔实验室,新泽西州默里山,1988年。

[I13.UNIXman1] AT&T Bell Laboratories, "UNIX TIME-SHARING SYSTEM (VOLUME 1) : UNIX Programmer's Manual", Holt, Rinehart, & Winston, 1979

[I13.UNIXman1]美国电话电报公司贝尔实验室,“UNIX分时系统(第1卷):UNIX程序员手册”,霍尔特、里内哈特和温斯顿,1979年

[I14.me] Allman, Eric P., "Writing Papers With NROFF Using -me", USD:19, University of California, Berkeley, Berkeley, California, 1997.

[I14.Me ]奥尔曼,Eric P.,“用NROFF用我写论文”,US: 19,加利福尼亚大学,伯克利,伯克利,加利福尼亚,1997。

[I15.DWBguide] AT&T Bell Laboratories, "Unix System V Documenter's Workbench User's Guide", Prentice Hall, 1989

[I15.DWBguide]美国电话电报公司贝尔实验室,“Unix系统V文档管理员工作台用户指南”,普伦蒂斯大厅,1989年

[I16.ms] Lesk, M. E., "Typing Documents on the UNIX System: Using the -ms Macros with Troff and Nroff", 1978, in "UNIX TIME-SHARING SYSTEM (VOLUME 2) : UNIX Programmer's Manual", Holt, Rinehart, & Winston, 1979

[I16.ms]Lesk,M.E.,“在UNIX系统上键入文档:将-ms宏与Troff和Nroff一起使用”,1978年,摘自“UNIX分时系统(第2卷):UNIX程序员手册”,Holt,Rinehart和Winston,1979年

[I17.RFC2183] Troost, R., Dorner, S., and K. Moore, "Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field", RFC 2183, August 1997.

[I17.RFC2183]Troost,R.,Dorner,S.,和K.Moore,“在互联网消息中传达呈现信息:内容处置标题字段”,RFC 2183,1997年8月。

[I18.RFC2049] Freed, N. and N. Borenstein, "Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples", RFC 2049, November 1996.

[I18.RFC2049]Freed,N.和N.Borenstein,“多用途Internet邮件扩展(MIME)第五部分:一致性标准和示例”,RFC 2049,1996年11月。

[I19.RFC3282] Alvestrand, H., "Content Language Headers", RFC 3282, May 2002.

[I19.RFC3282]Alvestrand,H.,“内容语言标题”,RFC32822002年5月。

[I20.BCP18] Alvestrand, H., "IETF Policy on Character Sets and Languages", BCP 18, RFC 2277, January 1998.

[I20.BCP18]Alvestrand,H.,“IETF字符集和语言政策”,BCP 18,RFC 2277,1998年1月。

Author's Address

作者地址

Bruce Lilly

布鲁斯·利莱

   EMail: blilly@erols.com
        
   EMail: blilly@erols.com
        

Full Copyright Statement

完整版权声明

Copyright (C) The Internet Society (2006).

版权所有(C)互联网协会(2006年)。

This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights.

本文件受BCP 78中包含的权利、许可和限制的约束,除其中规定外,作者保留其所有权利。

This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

本文件及其包含的信息是按“原样”提供的,贡献者、他/她所代表或赞助的组织(如有)、互联网协会和互联网工程任务组不承担任何明示或暗示的担保,包括但不限于任何保证,即使用本文中的信息不会侵犯任何权利,或对适销性或特定用途适用性的任何默示保证。

Intellectual Property

知识产权

The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79.

IETF对可能声称与本文件所述技术的实施或使用有关的任何知识产权或其他权利的有效性或范围,或此类权利下的任何许可可能或可能不可用的程度,不采取任何立场;它也不表示它已作出任何独立努力来确定任何此类权利。有关RFC文件中权利的程序信息,请参见BCP 78和BCP 79。

Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr.

向IETF秘书处披露的知识产权副本和任何许可证保证,或本规范实施者或用户试图获得使用此类专有权利的一般许可证或许可的结果,可从IETF在线知识产权存储库获取,网址为http://www.ietf.org/ipr.

The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org.

IETF邀请任何相关方提请其注意任何版权、专利或专利申请,或其他可能涵盖实施本标准所需技术的专有权利。请将信息发送至IETF的IETF-ipr@ietf.org.

Acknowledgement

确认

Funding for the RFC Editor function is provided by the IETF Administrative Support Activity (IASA).

RFC编辑器功能的资金由IETF行政支持活动(IASA)提供。