🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #68826

UTF-8 wildmats in INN

#68826
From: Andrew - Supernews
Date: Sun, 28 Mar 2004 21:38
21 lines
1761 bytes
If I add this to tests/lib/uwildmat-t.c (updating the test count), then
it fails. I think this is an error. Comments?

    test_r(167, "\303\206",       "*[^\303\206]",      false);

(\303\206 is a valid utf-8 sequence, corresponding to U+00C6.)

The reason it fails is because INN is trying to handle non-utf8 data in the
code for the "*" metacharacter by advancing by octets rather than characters.
My own wildmat code does not do this unless the character after the * is
itself non-utf8 (and not a metacharacter); this came up because I tried
running the INN tests against my code, and got some different results.
My code currently sees "\303\206" as not matching "*[\206]" (but matching
"*\206"), which is slightly strange, but I prefer to break the non-utf8
cases rather than the utf8 ones. I see no clean solution for this other
than significantly restructuring the code.

-- 
Andrew, Supernews
http://www.supernews.com - individual and corporate NNTP services
Technical Details
Message-ID: <slrnc6ehe7.25bv.andrew+nonews@trinity.supernews.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <slrnc6ehe7.25bv.andrew+nonews@trinity.supernews.net>
Subject: UTF-8 wildmats in INN
Date: Sun, 28 Mar 2004 21:38:15 -0000
From: Andrew - Supernews <andrew+nonews@supernews.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.mbox.zip!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
Newsgroups: news.software.nntp
Organization: http://www.supernews.com - all your nntp are belong to us
Reply-To: andrew@supernews.com
User-Agent: slrn/0.9.8.0 (FreeBSD)
X-Complaints-To: abuse@supernews.com
Lines: 20