🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #90291

Re: Encoding madness

#90291
From: Russ Allbery
Date: Thu, 13 Apr 2023 15:28
62 lines
4083 bytes
news@zzo38computer.org.invalid writes:

> My opinion is that newsgroup names should be purely ASCII (there are
> many benefits to this, and using non-ASCII characters in newsgroup names
> and domain names and commands and configuration files can cause many
> problems, including security issues (especially if any Unicode-based
> encoding is used; non-Unicode has less security issues, but still is not
> worth it to use non-ASCII in these cases), comparisons, input, etc).

It's very easy for someone who speaks English to say that newsgroup names
should be purely ASCII, but what we would be saying is that people who
only speak Japanese (or Chinese, or Russian, or...) should put up with
newsgroup names being opaque, incomprehensible blobs of foreign
characters.  Imagine what Usenet would be like for you if every newsgroup
name was in Arabic (or, if you happen to read Arabic, Korean, or some
other language).

Historically, that is exactly what we have said.  But I think that's sad.

The security problem is real, but honestly that's largely because Usenet
software is very old and is often written in languages that, if not
actually dying, are at least very stagnant.  Handling encodings properly
in C is a pain, but that's because doing anything properly in C is a pain.
Every modern language comes with extremely well-tested libraries, and most
of them now make *not* dealing with Unicode very difficult; it just
happens automatically.  The remaining non-coding problems are mostly about
homograph attacks, and that's not much of an issue with newsgroup names.

Using multiple encodings, as you say, definitely makes the problem worse,
since you can't simply reject all invalid UTF-8 very early on, since you
may instead be dealing with ISO-8859-1 or some other encoding.
Thankfully, there's no real reason to support anything other than UTF-8
now.  The remaining question is whether Usenet software can cope in
practice, or whether, like DNS and email, we'll be forced into using
complicated ASCII-compatible encoding schemes.  Experiments so far seemed
to indicate that native Usenet software support for UTF-8 newsgroup names
wasn't that bad.

I can't think of any other major Internet protocol, not even domain names,
that is still limited to ASCII.  Newsgroup names are a sad outlier.

> (But, I really hate Unicode; it is full of problems, including Han
> unification and other complications; and it is a stateful character set
> even though the encoding is stateless. TRON character code is better in
> some ways (especially for Japanese text), and I have done some work
> using this.)

I hate the email message format (it should be something much less
ambiguous and machine-parsable), the RFC 2822 Date format, and RFC 2047
header encoding.  The price of implementing protocols is that there will
always be parts of them you don't like because life is compromise.

> The RFC says that it should be UTF-8, but I think that this is a mistake
> in the design of the protocol.

Mistake or not, it's not going to change now.

-- 
Russ Allbery (eagle@eyrie.org)             <https://www.eyrie.org/~eagle/>

          Please post questions rather than mailing me directly.
     <https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
Technical Details
Message-ID: <87zg7bvm1j.fsf@hope.eyrie.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
References: <20230411014437.0aef1026@wibble.sysadmininc.com> <1681245447.bystand@zzo38computer.org>

Show Full Headers
Complete Article Headers
Message-ID: <87zg7bvm1j.fsf@hope.eyrie.org>
Subject: Re: Encoding madness
Date: Thu, 13 Apr 2023 08:28:40 -0700
From: Russ Allbery <eagle@eyrie.org>
References: <20230411014437.0aef1026@wibble.sysadmininc.com> <1681245447.bystand@zzo38computer.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!apf1.newsdeef.eu!not-for-mail
Newsgroups: news.software.nntp
Organization: The Eyrie
Mime-Version: 1.0
Content-Type: text/plain
Injection-Info: hope.eyrie.org; logging-data="17842"; mail-complaints-to="news@eyrie.org"
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Cancel-Lock: sha1:U1yAPwdCP3vZ61gmTcaYNx/kXCg=