🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #44530

Re: [NNTP Draft] 5. The WILDMAT format

#44530
From: Andrew Gierth
Date: Sun, 27 Feb 2000 00:00
26 lines
2110 bytes
>>>>> "Russ" == Russ Allbery <rra@stanford.edu> writes:

 Russ> In the presence of UTF-8, ranges are very poorly specified.
 Russ> Handling character ranges in wildcard expressions in the
 Russ> presence of Unicode and combining characters and the like is
 Russ> one of those incredibly complicated subjects that one really
 Russ> doesn't want to get into.  I'm not sure what a good solution to
 Russ> this would be; in practice, character ranges are rarely used.
 Russ> Perhaps it would be worth just saying that character ranges are
 Russ> only guaranteed to be usable for ASCII characters.

I have a trial implementation of wildmat for UTF-8 strings;
implementing the character classes was not so bad (but I haven't
tested it extensively yet, so I may be premature in saying that :-)

Wildmat ranges are only single-character metacharacters which makes it
simple. The implementation is exactly the same as before, one simply
uses 32-bit variables rather than 8-bit ones (and UCS-4 only needs 31
bits, so signed 32-bit is ok) and converts UTF-8 characters into UCS-4
as they are read. OK, it doesn't really fit nicely in one hairy for()
loop like the current wildmat code, but...

-- 
Andrew.

Technical Details
Message-ID: <87bt5385y2.fsf@erlenstar.demon.co.uk>
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!not-for-mail
References: <87snyfd367.fsf@erlenstar.demon.co.uk> <ylaekn2l33.fsf@windlord.stanford.edu>

Show Full Headers
Complete Article Headers
Message-ID: <87bt5385y2.fsf@erlenstar.demon.co.uk>
Subject: Re: [NNTP Draft] 5. The WILDMAT format
Date: Sun, 27 Feb 2000 00:00:00 +0000
From: Andrew Gierth <andrew@erlenstar.demon.co.uk>
References: <87snyfd367.fsf@erlenstar.demon.co.uk> <ylaekn2l33.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.mbox.zip!not-for-mail
X-Deja-AN: 590527069
X-Mayan-Date: Long count = 12.19.6.17.17; tzolkin = 1 Caban; haab = 5 Kayab
X-Complaints-To: andrew@erlenstar.demon.co.uk
Organization: disorganised
X-Attribution: AG
X-Pgp-0x0E9FFBE9: 87 25 7F 14 41 24 B3 51 E0 19 8B DE 49 74 0C 29
X-P-Persistent-Headers: are a bad idea.
Newsgroups: news.software.nntp
X-Post-Filter: postfilter v0.6 alpha