🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #248589

Re:  Jeff Relf has set a bad example.

#248589
From: Russ Allbery
Date: Tue, 14 Feb 2012 05:47
70 lines
5535 bytes
Demented Traveler <detravel@simic.net> writes:
> On 14/02/2012 12:22 AM, Russ Allbery wrote:

>> Also, note that your proposed normalization function still doesn't deal
>> with Unicode properly.  Semantically identical message IDs could still
>> end up with different normalized forms.  The sequences e with an acute
>> accent (U+00E9) and e followed by combining accent acute (U+0065
>> U+0301) will map to different normalized forms, but are semantically
>> the same character and, per the Unicode standard, are generally
>> supposed to be treated as equivalent.

> However, the message would have been injected with only one or the other
> of those sequences. If a message had one form and another had the other
> form, producing different normalized IDs, then they were
> separately-injected messages and are *supposed* to have distinct IDs!

You're assuming that no one normalized the Unicode somewhere in the
network and that the only time the octet sequence associated with the
message ID was generated was when the article was injected.  This is a
good assumption to make with some use cases with current software that
understand Unicode at all, but it's not an assumption that you're
generally supposed to make with Unicode-aware software.

Consider, for example, the use case where a user re-enters a message ID to
try to find it (in a search by message ID interface in a news reader, for
example; many news readers have them and they can be quite useful).  In
that case, you're almost guaranteed to get different normalization forms,
since you get whatever the local input method produces, which is going to
be whatever is convenient for it.  So users search for a message ID and
can't find it even though, when looking at the message ID, it looks
exactly like what they typed.

Another example would be if a user cut and pastes a message ID into the
body of an article, to refer to another thread for example.  It's totally
fair game for the article editor to use whatever Unicode form is the most
convenient for it, since Unicode says that all those representations of
the character are equivalent, so it may decide to normalize the article
into decomposed form (for example) because it's handy for some internal
reason.  But now if you cut and paste that message ID, you don't find the
original article.

Another place where Unicode can shift between normalization forms is in
gatewaying scenarios, where articles may pass through Unicode-aware
software that isn't netnews-aware and hence isn't obsessive about
preserving the exact octet form of the message ID.

All this is why every IETF protocol that supports Unicode defines a
normalization protocol that must be used before comparing input.  See, for
example, IDNA (RFC 3490), which is the standard for using Unicode in
domain names.  It uses nameprep normalization, which in turn is a profile
of stringprep, which if you trace all the way through RFC 3491 and RFC
3454, you find requires using Unicode NFKC normalization (and then applies
a bunch of other rules and even bans a specific set of characters).  NFKC
is the normalization form that says that you decompose characters in a way
to collapse all compatibility characters and then combine all accent marks
you can in order to create combined characters where possible.  To do it
properly requires large tables of correct decomposition and normalization
forms for various characters (which you have to keep updating as new
versions of Unicode are released).

This stuff is hard.  People who haven't done serious work on character
sets (including myself prior to the USEFOR discussion when I had to go off
and study the issues) almost always drastically underestimate how complex
character set issues are.

-- 
Russ Allbery (rra@stanford.edu)             <http://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <http://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87d39im0fd.fsf@windlord.stanford.edu>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!nntp.giganews.com!feed.xsnews.nl!border-2.ams.xsnews.nl!xlned.com!feeder7.xlned.com!news2.euro.net!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
References: <slrnjikokv.3g8.steve@news.mixmin.net> <jhb1r2$fqd$1@news.trigofacile.com> <Jeff-Relf.Me@2012_Feb.13^11.35.am> <jhbr4j$ddu$1@news.trigofacile.com> <jhcb00$sks$1@pcls6.std.com> <Jeff-Relf.Me@2012_Feb.13^5.53.pm> <Z@Z> <87lio6m2q9.fsf@windlord.stanford.edu> <jhcqa9$s64$1@speranza.aioe.org> <87hayum1kq.fsf@windlord.stanford.edu> <jhcrdq$ube$1@speranza.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <87d39im0fd.fsf@windlord.stanford.edu>
Subject: Re:  Jeff Relf has set a bad example.
Date: Mon, 13 Feb 2012 21:47:02 -0800
From: Russ Allbery <rra@stanford.edu>
References: <slrnjikokv.3g8.steve@news.mixmin.net> <jhb1r2$fqd$1@news.trigofacile.com> <Jeff-Relf.Me@2012_Feb.13^11.35.am> <jhbr4j$ddu$1@news.trigofacile.com> <jhcb00$sks$1@pcls6.std.com> <Jeff-Relf.Me@2012_Feb.13^5.53.pm> <Z@Z> <87lio6m2q9.fsf@windlord.stanford.edu> <jhcqa9$s64$1@speranza.aioe.org> <87hayum1kq.fsf@windlord.stanford.edu> <jhcrdq$ube$1@speranza.aioe.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-alt.free.newsservers.20150605.mbox.gz!border1.nntp.ams3.giganews.com!border2.nntp.ams3.giganews.com!border2.nntp.ams2.giganews.com!border4.nntp.ams.giganews.com!nntp.giganews.com!feed.xsnews.nl!border-2.ams.xsnews.nl!xlned.com!feeder7.xlned.com!news2.euro.net!news.glorb.com!usenet.stanford.edu!usenet-its.stanford.edu!not-for-mail
Newsgroups: news.software.nntp,alt.free.newsservers,news.software.readers
Organization: The Eyrie
Lines: 70
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: usenet-its.stanford.edu 1329198424 3076 171.67.225.134 (14 Feb 2012
X-Complaints-To: news@usenet-its.stanford.edu
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux)
Cancel-Lock: sha1:fNx1oG6+pkkEYjoRcVpkiUW1RU8=
X-Original-Bytes: 5349