🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #248596

Re:  Jeff Relf has set a bad example.

#248596
From: Russ Allbery
Date: Tue, 14 Feb 2012 07:07
179 lines
11686 bytes
Demented Traveler <detravel@simic.net> writes:
> On 14/02/2012 12:47 AM, Russ Allbery wrote:

>> 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.

> It's what would happen if we took the current situation, where servers
> either treat message-IDs as octet strings and don't change or interpret
> them at all or else reject some and treat the rest as opaque strings,
> and then added servers that flatten them into ASCII and don't otherwise
> manipulate them.

Right.  My point is that that *isn't* the only thing that a message ID is
used for on Usenet, so the set of use cases that you're considering is a
bit artificially limited.  :)

If all you care about is server behavior, you can generally (not
completely, but generally) assume that what's currently happening is octet
comparison.  There are some completely bizarre cases in INN where this
isn't the case, but they're not particularly important, and are really
long-standing bugs.

Past experience says that you shouldn't be too optimistic that everyone is
going to implement the new normalization properly and in the same way, but
the number of problems that would result is probably relatively low if
you're considering only servers.  My guess is that most of your problems
are not going to be message ID uniqueness problems, but rather will be
with various strange failures, syntax errors, and other forms of lack of
cope from existing servers that don't like getting UTF-8 in NNTP commands.
This can be a significant problem, though; TAKETHIS and NNTP syntax errors
do not play well together, and we've had real implementation issues with
that in INN in the past.

>> 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.

> That's a UI/client-side issue rather than a network-meltdown-inducing
> issue, though. The problem we were trying to address was *solely* that
> servers might mangle the ID and spawn endlessly duplicating messages, or
> similar problems.

Well, that may be the problem that *you're* trying to solve, but it's not
the problem that *I'm* trying to solve.  :)  I think a proper design for
allowing Unicode in places it's not currently allowed needs to look at all
the use cases.  The network meltdown problems of course come most
immediately to mind, but all the interoperability issues are interesting.

I also take some minor issue with the idea that this is just a client-side
issue, since the problem with not doing normalization is precisely that
the client *can't* do the right thing.  The client doesn't know what
normalization is used, so even if the client wants to do the right thing,
the client is helpless.  All it could do is try *every possible
variation*, which as you can imagine can be quite large, and which is not
an operation that the normally available Unicode handling libraries offer.

> But considering user searches for message IDs, where are they getting it
> in the first place? Probably by copy and paste from someplace (perhaps
> Google Groups). It's likely the already-normalized message ID and if
> it's not it'll be the original as injected, which will normalize to the
> same value.

You're assuming that copy and paste preserves the Unicode normalization
form.  Are you sure this is a valid assumption?  I don't see any reason to
assume that your OS copy/paste, with a Unicode-aware OS (and that's nearly
all of them these days), is going to do an octet-by-octet copy of the raw
octets.  Among other things, it's quite plausible that the OS or software
program will have changed normalization forms for display, to match what's
expected by the font in use for example, so what's displayed (and hence
copied) may not be the original form.

The invariant that you're relying on here is not actually invariant in
Unicode.  Most people are used to the simple case of ISO 8859 charsets,
but those have about a tenth the complexity of Unicode.

> That would be more of a problem. Perhaps there should be a normalization
> within Unicode.

There are a whole bunch of normalizations within Unicode, and each
protocol and application gets to pick which ones they want to use.  But
that doesn't happen automatically; the protocol has to say somewhere that
you have to normalize, and specify *when* you normalize.

> That seems less likely. Articles circulating among usenet servers would
> get the normalization outlined and nothing else. On the other hand,
> gatewaying outside of Usenet tends to happen at the edges: to web sites,
> or to email. When the door swings both ways it doesn't tend to do it
> automatically: an article is sent to someone as email, and if they reply
> by email that gets posted, say, but no article is converted to email,
> then back to netnews, and continues propagating.

You are, like most people who see gatewaying and think it's something
exotic and rare, neglecting newsgroup moderation.  :)  Which is by far the
most common gatewaying situation, and is bidirectional to boot.  And
frequently passes through the most stunning array of ad hoc scripts,
bizarre mail clients, and weird file handling that you have ever seen in
your life.  Moderators use an amazing variety of bailing wire and chewing
gum to run their groups.

> And nothing stops this being done for netnews too. The only viable
> alternative may be to reject such message IDs outright and put up with
> Relf's whining. :)

What gets me is that message IDs are just a dumb place to do this work.
They're much more critical than other parts of the message, and Unicode in
message IDs serves very little useful practical purpose.  If we're going
to go to the work of allowing Unicode, let's do newsgroup names!  They're
actually user-visible, they're actively buggy at the moment for our
non-English-speaking users who have words they want to use in newsgroup
names that don't collapse into ASCII, and the payoff is much more
satisfying.  And they pose many of the same issues.

Message IDs are the last thing I'd try to change.  Unlike every other
place one would look to add Unicode support, being ASCII-only isn't really
hurting message IDs in any appreciable way.

> Blame the dumbass that decided to allow multiple equivalent ways to
> specify the same character in the first place.

There are also a lot of politics involved in character sets.  I followed
Unicode development for a long time, and I can assure you that the people
who worked out the compromises and details of the current standard aren't
dumbasses.  They were operating under a bunch of constraints, though (and
there's some committee stupidity, as there is in any large cooperative
effort involving humans).

Making a standard that's easy to work with technically is important, but
making one that people would actually adopt and not ignore in favor of
continuing to use a blizzard of national character sets was also
important, and that's where a lot of the precombined characters come from.
(It would be simpler in a lot of ways, and elegant, if the only accent
marks were combining marks.)  And they were also trying to solve a bunch
of other difficult problems at the same time (such as Arabic script, which
simply requires reasonable support for combining characters).

> They should have probably not tried to be back-compatible with Latin-1
> (just ASCII) and defined a character as an accent marker (0 for none, 1
> for acute, 2 for grave, 3 for umlaut, 4 for the little ~ thing on Ns in
> Spanish, 5 for the little curlicue on Cs in French, and so forth)
> followed by a character code (itself wider than 8 bits, so the ten
> thousand symbols of Chinese for example could be accomodated). For
> convenient word alignment and to ensure plenty of room for expansion,
> one byte for accent and three for main glyph would probably have
> sufficed; that gives you 16,777,216 symbols (all the ideogrammic
> languages out there would still consume only a fraction of that, leaving
> plenty for when we encounter the Zurglebians and their million-character
> alphabet in 2147) and 256 different accents and valid combinations of
> accents (there probably aren't many of the latter).

You need more than 256 different combining characters, because they're not
just used for accent marks such as in the languages that you're probably
thinking of.  Take a look at Arabic; it's really rather interesting.  The
comment about not many valid combinations of accents also makes me think
that you've never seen written Vietnamese.  :)

> There'd only be one code for each symbol then, and 0 0 0 65 would still
> be unaccented capital A, so ASCII would still round-trip intact if you
> stripped the three high bytes.

UTF-32 is something akin to what you are describing, to mention, although
it doesn't divide up the character space in the way that you describe and
it of course still has combining marks.  But you can't use UTF-32 with any
legacy protocol because all those 0 bytes look like nul characters and
break everything written with C string handling.  Hence UTF-8.

-- 
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: <87zkcllwpq.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.ams.giganews.com!nntp.giganews.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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> <87d39im0fd.fsf@windlord.stanford.edu> <jhcukh$4fu$1@speranza.aioe.org>

Show Full Headers
Complete Article Headers
Message-ID: <87zkcllwpq.fsf@windlord.stanford.edu>
Subject: Re:  Jeff Relf has set a bad example.
Date: Mon, 13 Feb 2012 23:07:13 -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> <87d39im0fd.fsf@windlord.stanford.edu> <jhcukh$4fu$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.ams.giganews.com!nntp.giganews.com!xlned.com!feeder5.xlned.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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: 179
NNTP-Posting-Host: windlord.stanford.edu
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: usenet-its.stanford.edu 1329203234 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:i1RJRs3ZpiKKzDZVCnajK/vpgqY=