Are non-ascii characters allowed as values for email X-headers?

1

I'm troubleshooting an issue that seems related to a mail server not being able to understand some international characters in the value of an x-header. This leads to a broader question: are non-ascii characters permitted as x-header values?

Mike B

Posted 2016-05-28T00:57:20.247

Reputation: 2 308

Answers

2

Non-ASCII characters are not permitted in MIME headers.

While X-header fields were explicitly protected from being standardised, they must conform to the general MIME header standards. RFC822 (section 3.1.1) defines the header fields as:

Each header field can be viewed as a single, logical line of ASCII characters, comprising a field-name and a field-body.

RFC2047 (Message Header Extensions for Non-ASCII Text) defines the methods for encoding non-ASCII characters.

techraf

Posted 2016-05-28T00:57:20.247

Reputation: 4 428

1

…and RFC6152 defines the transport of full 8-bit data (including UTF-8) in headers and body. Do note also that RFC822 (dated 1982) has been marked as "obsoleted by" RFC2822 in 2001, which also has been marked as "obsoleted by" RFC5322 in 2008, so it's no longer an authoritative reference of any sort.

– user1686 – 2016-05-28T12:18:13.133

Does RFC6152 really apply to header fields? – techraf – 2016-05-28T12:26:05.297