跳到主要内容

7. 等价性定义

7.1. IA5Text - text/plain​

X.400 Body Part: IA5Text MIME Content-type: text/plain; charset=US-ASCII

Conversion Type: Byte copy Comments: 从 X.400 映射到 MIME 时, "repertoire" 参数被忽略. 从 MIME 映射到 X.400 时, "repertoire" 参数设置为 IA5 (5). 注意: 当且仅当 IA5Text 信体部分是 IPMS.Body 序列中唯一的信体部分时, 从 X.400 映射到 MIME 才省略 MIME Content-type 头. 注意: IA5Text 在位置 2/4 指定 "currency" 符号. 这被不加评论地转换为 "dollar" 符号, 因为本文档的作者见过许多文档, 其中该位置意在表示 "dollar", 而他还没有见过意在表示 "currency" 符号的文档. (作为参考: 定义 IA5 的 T.50 (1988) 建议谈到 ISO 注册集编号 2, 而使用 "dollar" 符号的 ASCII 是 ISO 注册集编号 6. 没有其他差异.)

7.2. GeneralText - text/plain (ISO-8859)​

X.400 Body Part: GeneralText; CharacterSets in

                        6,100,101,109,110,126,127,138,144,148

MIME Content-Type: text/plain; charset=ISO-8859-(1-9) Conversion Type: Byte copy Comments: 从 X.400 映射到 MIME 时, 根据 Parameters.CharacterSets 的值按下表选择字符集. 从 MIME 映射到 X.400 时, GeneralText 是一个扩展信体部分, 因此它需要一个 OID. GeneralText 信体的 OID 在 [5] 第 8 部分附录 D 中定义为 {2 6 1 4 11}. 参数的 OID 为 {2 6 1 11 11}. Parameters.CharacterSets 根据 "charset" 的值按下表设置. 注意: GeneralText 信体部分定义于 ISO 10021-8 [5], 而不是相应的 CCITT 建议中. 其参数在一份缺陷报告中被大幅修改, 在标准的下一版本中将是一个 SET OF INTEGER (指示所有使用集合的 ISO 注册表编号).

下表列出 MIME 字符集及相应的 ISO 注册表编号. 如果找不到对应关系, 则此转换失败, 并采用通用信体部分方法.

MIME charsetISO IR numbersComment
ISO-8859-16, 100西欧 "8 位 ASCII"
ISO-8859-26, 101东欧
ISO-8859-36, 109
ISO-8859-46, 110
ISO-8859-56, 144西里尔文
ISO-8859-66, 127阿拉伯文
ISO-8859-76, 126希腊文
ISO-8859-86, 138希伯来文
ISO-8859-86, 148其他使用拉丁字母的语言

从 MIME 转换到 X.400 时, 通过在上面的表中查找 ISO IR 编号, 然后将其附加到 id-cs-eit-authority {1 0 10021 7 1 0} OID, 生成消息信封的 Encoded Information Types 中使用的正确 OID. 必须在 GeneralText 字符串的前端添加用于在适当位置指定和调用相关字符集的转义序列.

7.3. BilaterallyDefined - application/octet-stream​

X.400 Body Part: BilaterallyDefined MIME Content-Type: Application/Octet-Stream (no parameters) Conversion Type: Byte copy Comments: 从 MIME 映射到 X.400 时, 如果 Content-Type: 头字段中存在参数, 则转换失败, 因为 BilaterallyDefined Body Part 没有任何相应的 ASN.1 参数. 讨论: 参数 "name", "type" 和 "conversions" 是建议性的, 但在某些情况下可能对文件的预期处理给出重要提示. 参数 "conversions" 没有完整定义, 但预计它会有用, 因此我们不能丢弃它并期望人们感到满意. 参数 "padding" 改变了数据最后一个字节的解释, 因此不能删除. 一种选择是在前面加上一个包含参数文本的 IA5 信体部分; 这将有助于未经修改的读取器, 并且大概可以通过适当的手法使其变得

可逆, 但这值得吗???? 另外, 在 1988 年和 1992 年 X.400 中都明确不赞成使用 BilaterallyDefined Body Parts. 保留它仅仅是为了与 1984 年系统向后兼容. 1992 年 X.400 定义了一个文件传送信体部分 (File Transfer Body Part) 来解决这个问题 (即通过电子邮件进行二进制文件传送). 该标准及其区域轮廓还不够成熟, 尚不能作为此问题的解决方案加以利用.

7.4. ODA - application/oda​

X.400 Body Part: ODA MIME Content-Type: application/oda Conversion Type: Byte copy Comments: ODA 信体部分定义于 CCITT 文档 T.411 [6] 的附录 E, 第 E.2 节, "ODA identification in the P2 protocol of MHS". 其 ASN.1 定义的简略版本为:

    oda-body-part EXTENDED-BODY-PART-TYPE
PARAMETERS OdaBodyPartParameters
DATA OdaData
::= id-et-oda

OdaBodyPartParameters ::= SET {
document-application-profile [0] OBJECT IDENTIFIER
document-architecture-class [1] INTEGER {
formatted (0)
processable (1)
formatted-processable(2)}}

id-et-oda OBJECT IDENTIFIER ::= { 2 8 1 0 1 }

从 X.400 映射到 MIME 时, 执行以下操作: Parameters.document-application-profile 根据下表映射到 MIME 参数 "profile".

    Profile         OBJECT IDENTIFIER

Q112 { iso (1) identified-organization (3) ewos (16)
eg (2) oda (6) profile (0) q112 (1) }

Parameters.document-architecture-class 根据下表映射到 MIME 参数 "class".

    String                  Integer

formatted formatted(0)
processable processable(1)
formatted-processable formatted-processable(2)

注意: 此参数未在 RFC 1341 中定义. MIME content-type 的信体是 ODA 信体部分的 Data 部分. 从 MIME 映射到 X.400 时, 执行以下步骤: Parameters.document-application-profile 和 Parameters.document-architecture-class 根据上面的表设置. 如果缺少任何参数, 则使用 Q112 和 formatted-processable 的值. 网关实现者可以选择尝试从文档内部访问它们, 在文档内部它们定义为 document-profile.document-characteristics.document-architecture-class 和 document-profile.document-characteristics.document-application-profile. 网关不要求 (NOT required) 这样做, 因为 document-characteristics 是可选参数. 如果网关不这样做, 它只是使用上面定义的默认规则. 文档应用轮廓和 ODA 的 OBJECT IDENTIFIER {2 8 0 0} 必须添加到消息信封的 Encoded Information Types 参数中.

7.5. g3-facsimile - image/g3fax​

X.400 Body part: g3-facsimile MIME Content-Type: image/g3fax Conversion Type: nearly Byte copy Comments: X.400 G3Fax 信体部分的参数映射到 MIME Image/G3Fax 信体部分上相应的参数, 反之亦然. 请注意:

    (1)  If fineResolution is not specified, pixels will be
twice as tall as they are wide

(2) If any bit not corresponding to a specially named
option is set in the G3Fax NonBasicParameters, the
"DCS" parameter must be used.

(3) Interworking is not guaranteed if any bit apart from
those specially named are used in the
NonBasicParameters

从 X.400 到 G3Fax, 信体按以下方式创建:

    (1)  Any trailing EOL markers on each bitstring is
removed. The bistring is padded to a byte boundary.

(2) 6 consecutive EOL markers are appended to each
bitstring.

(3) The padded bitstrings are concatenated together

EOL 标记是比特序列 000000000001 (11 个零和一个 1). 从 G3Fax 到 X.400, 信体按以下方式创建:

    (1)  The body is split into bitstrings at each occurrence
of 6 consecutive EOL markers, and trailing EOLs and
padding are removed

(2) Each bitstring is made into an ASN.1 BITSTRING

(3) The bitstrings are made into an ASN.1 SEQUENCE, which
forms the body of the G3Fax body part.

7.6. application/postscript - postscript-body-part​

X.400 Body Part: Extended Body Part, OID postscript-body-part MIME Content-Type: application/postscript Conversion Type: Byte Copy

7.7. application/jpeg - jpeg-body-part​

X.400 Body Part: Extended Body Part, OID jpeg-body-part MIME Content-Type: application/jpeg Conversion Type: Byte Copy

7.8. image/gif - gif-body-part​

X.400 Body Part: Extended Body Part, OID gif-body-part MIME Content-Type: application/gif Conversion Type: Byte Copy