Article View: news.software.nntp
Article #79939Re: UTF-8 in NNTP commands
From: Russ Allbery
Date: Sun, 28 Dec 2008 19:54
Date: Sun, 28 Dec 2008 19:54
54 lines
3705 bytes
3705 bytes
Julien ÉLIE <iulius@nom-de-mon-site.com.invalid> writes:
> Should a news server generate a 501 response upon receiving an NNTP
> command which is not properly encoded in UTF-8?
The standard says that clients shouldn't do that, which means that servers
can choose what to do if they receive something like that based on the
normal principles of being liberal in what one accepts.
> RFC 4643 (AUTHINFO) does not tackle the issue of encodings. Therefore,
> I believe it is assumed that everything is in UTF-8.
>
> However, I am unsure that logins and passwords are correctly encoded
> by news clients. I do not know what they send!
>
> AUTHINFO USER été
> AUTHINFO PASS αβγ
>
> is not allowed by RFC 3977.
> And afterwards, external auth programs will have to handle UTF-8 too...
I'm sure right now they assume servers implement this as byte strings.
SASL provides ways of dealing with this, including Unicode
canonicalization (depending on the SASL mechanism chosen). I think the
AUTHINFO USER/PASS code should just preserve the legacy approach of
treating the input as a byte string, since newer clients should hopefully
switch to SASL anyway and that's the best opportunity to change behavior
here. Character set issues really aren't defined well unless you're using
SASL, and there are a ton of them around authentication information and a
whole standard within SASL (saslprep, RFC 4013) for dealing with them.
> If two newsgroups have the same name (one encoded in ISO-8859-1 and
> the other in UTF-8 for instance), they may be seen as two different
> newsgroups and we wouldn't be able to access the first one if UTF-8
> was required.
The server really can't do character set conversion since there's no way
for the client to say what character set it's using, so I think all of the
work needs to be done on the client. Given that, it's probably simplest
for backwards compatibility for whatever people might be doing in local
hierarchies if the server treats newsgroup names as byte strings and
doesn't reject non-UTF-8 ones.
Currently, there's no provision for non-ASCII newsgroup names in the
article format standard. My hope is that we'll manage to jump mostly
straight from ASCII to UTF-8 without a lot of ISO-8859-1 newsgroup names
(there are a few out there now, but not many at all).
--
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:
<87sko8m5wv.fsf@windlord.stanford.edu>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!spln!extra.newsguy.com!newsfeed.stanford.edu!news.stanford.edu!not-for-mailReferences:
<gj8kvn$1aq$1@news.trigofacile.com>Show Full Headers
Complete Article Headers
Message-ID: <87sko8m5wv.fsf@windlord.stanford.edu> Subject: Re: UTF-8 in NNTP commands Date: Sun, 28 Dec 2008 11:54:56 -0800 From: Russ Allbery <rra@stanford.edu> References: <gj8kvn$1aq$1@news.trigofacile.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border2.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!news-out1.kabelfoon.nl!newsfeed.kabelfoon.nl!xindi.nntp.kabelfoon.nl!spln!extra.newsguy.com!newsfeed.stanford.edu!news.stanford.edu!not-for-mail Newsgroups: news.software.nntp Organization: The Eyrie Lines: 54 NNTP-Posting-Host: windlord.stanford.edu Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: news.stanford.edu 1230494096 15190 171.67.225.134 (28 Dec 2008 X-Complaints-To: news@news.stanford.edu User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux) Cancel-Lock: sha1:q77Taa/8BbFo8dVUdiaTAKYGth4= X-Original-Bytes: 3444