🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #86756

Re: Unicode in USENET article headers

#86756
From: Joshua Cranmer 🐧
Date: Thu, 07 May 2015 21:59
68 lines
4917 bytes
On 5/7/2015 8:26 AM, Michael Baeuerle wrote:
> Current situation:
> RFC5536 [1] define the whole header as US-ASCII encoded. If an article
> header should contain something else, MIME (RFC2047 [2]) transfer
> encoding is required to produce a standard compliant article.

Have you read and followed RFC 6530 and friends, as well as the list 
traffic for the IETF eai and ima working groups? These give you roughly 
the history of how the email people decided to sort out non-ASCII email.

The foremost issue in email is allowing non-ASCII local parts, which 
indirectly affects everyone who uses addr-spec. The solution of EAI was 
to effectively create a message/global type that is UTF-8 
(message/rfc822 remains 7-bit), and to sort of require that 
message/global get transported by requiring extra actions on part of 
clients in SMTP, POP, and IMAP. EAI decided against doing in-flight 
downgrading, so it's entirely up to the client to decide when to use 
message/global versus message/rfc822.

RFC 6530 ducks the issue of email normalization, continuing in the 
tradition of "thou shalt not interpret a localpart unless you are the 
destination MDA," the normalization of email addresses is undefined. 
However, they do advise that clients may normalize to NFC/NFKC before 
hand, so they suggest that servers not have email addresses that match 
after normalization.

If you translate EAI to NNTP, what you'd get is roughly the following:
* A capability to advertise UTF-8 support on the part of the server.
* A command that the client runs to indicate "I can read UTF-8"
* The server downgrades messages to clients that don't run 
aforementioned command
* Don't make newsgroups that don't match after NFC. Actually, I'd just 
go so far as to require that newsgroup names be in NFC.

> Problem:
> MIME encoded words are ugly and complicate to handle. People want an
> easier way to implement agents.

RFC 2047 is more often incorrectly implemented than correctly 
implemented (particularly when it comes to splitting words [1]). 
Unfortunately, it's also going to be needed to be supported for at least 
20 years, simply because clients aren't going to update particularly 
quickly.

> P1) Compare may fail / Identifiers may be ambigous
> The most relevant identifiers in article headers are:
> - Message-IDs
> - Newsgroup lists
> Unicode defines how to normalize strings so that they can be compared
> as octet streams [5]. Current standards [6] recommend (but not mandate!)
> to apply normalization form C (NFC) to all Unicode data before
> transmission.

For any domain name not in an addr-spec (i.e., including message-id), 
require that the domain name be in its A-label (x-*) form. DNS 
guarantees that it exists, it lets you bypass the IDNA clusterfuck, and 
it solves the normalization problem very nicely and easily.

[1] RFC 2047 mandates that you don't split in the middle of a multibyte 
character. Doing this properly in a charset-agnostic way requires 
carefully adding characters one at a time until you find the longest 
length before wrapping... and if you're using a language like Java where 
non-BMP characters are actually two characters, it's even more annoying. 
It's actually why I included an emoji character in my display name.

-- 
Beware of bugs in the above code; I have only proved it correct, not 
tried it. -- Donald E. Knuth
Technical Details
Message-ID: <mign6b$cf7$1@dont-email.me>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!nntp.giganews.com!m20no9297718iga.0!news-out.google.com!n7ni27383igk.0!nntp.google.com!news.glorb.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
References: <AABVSz44XaQAABwE.A1.flnews@WStation3.stz-e.de>

Show Full Headers
Complete Article Headers
Message-ID: <mign6b$cf7$1@dont-email.me>
Subject: Re: Unicode in USENET article headers
Date: Thu, 7 May 2015 16:59:38 -0500
From: Joshua Cranmer 🐧 <Pidgeot18@verizon.invalid>
References: <AABVSz44XaQAABwE.A1.flnews@WStation3.stz-e.de>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20150601.mbox.gz!border2.nntp.dca1.giganews.com!nntp.giganews.com!m20no9297718iga.0!news-out.google.com!n7ni27383igk.0!nntp.google.com!news.glorb.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
X-Received: by 10.182.246.134 with SMTP id xw6mr1185264obc.38.1431035980895;
Newsgroups: news.software.nntp
Organization: A noiseless patient Spider
Lines: 68
Mime-Version: 1.0
Injection-Date: Thu, 7 May 2015 21:58:35 +0000 (UTC)
Injection-Info: mx02.eternal-september.org;
 posting-host="8cedddb29338592f734c41b16a68fadc";
 logging-data="12775"; mail-complaints-to="abuse@eternal-september.org";
 posting-account="U2FsdGVkX1+ZtH9FnZmYhwnIVL8qwWNKEp8ezwchXzw="
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101
 Thunderbird/38.0
In-Reply-To: <AABVSz44XaQAABwE.A1.flnews@WStation3.stz-e.de>
Cancel-Lock: sha1:3vO7Q7YnukVQopF2AH1aHO3qiPE=
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit