SIP Content-Type 字符集,定义在哪个标准中

SIP Content-Type charset, in which standard is it defined

RFC 3261 的 20.15 部分提到 Content-Type 为:

The Content-Type header field indicates the media type of the message-body sent to the recipient. The "media-type" element is defined in [H3.7]. The Content-Type header field MUST be present if the body is not empty. If the body is empty, and a Content-Type header field is present, it indicates that the body of the specific type has zero length (for example, an empty audio file).

The compact form of the header field is c.

Examples:

 Content-Type: application/sdp
 c: text/html; charset=ISO-8859-4

我的问题:charset是在哪里定义的,有预定义的值吗?

我在 RFC 3261 中找到的所有内容都在 25.1 部分中,将 Content-Type 的句法形式 (vai ABNF) 定义为:

message-header = (Accept ... / Content-Type ...

Content-Type = ( "Content-Type" / "c" ) HCOLON media-type

media-type = m-type SLASH m-subtype *(SEMI m-parameter)

m-type = discrete-type / composite-type

discrete-type = "text" / "image" / "audio" / "video" / "application" / extension-token

composite-type = "message" / "multipart" / extension-token

extension-token = ietf-token / x-token

ietf-token = token

x-token = "x-" token

m-subtype = extension-token / iana-token

iana-token = token

m-parameter = m-attribute EQUAL m-value

m-attribute = token

m-value = token / quoted-string

感谢

在 SIP 中,Content-Type header 被定义为 MIME 类型,因此继承了 MIME 字符集处理。所以理论上你应该选择 IANA 上的注册值:IANA charsets

注册详情已定义IANA Charset Registration ProceduresRFC