MIME Distribution: headers
Julien ÉLIE
julien at trigofacile.com
Fri Sep 11 20:55:16 UTC 2009
Hi Russ,
>> Does someone know a good UTF-8 checker to validate a string?
>
> The utf8_length function in lib/uwildmat.c is close and could probably be
> turned into that without a whole lot of difficulty. It currently allows
> non-UTF-8 characters and just returns a length of 1 for them, but it
> wouldn't take much more checking to fix that.
OK, thanks for the tip.
>> Another question: with the active.times file, I do not know what is the
>> best we can do in order to write the newsgroup creator's name in
>> UTF-8... I think that only ctlinnd matters for that (mod-active and
>> controlchan write "usenet" or something like that -- I have not
>> checked). Is putting a warning in the man page of ctlinnd enough? The
>> encoding depends on the one of the shell used!
>
> Yeah, that one is hard. I'm not sure there's any really good solution
> there other than a warning... I guess the other option would be to check
> the string we're about to write to be sure it's correctly formed UTF-8,
> and if it isn't, fail with an error instead of creating the group.
We will then have that behaviour:
% ctlinnd newgroup test.a y é
ctlinnd: Invalid UTF-8 creator's name
zsh: exit 1 ctlinnd newgroup test.a y é
% ctlinnd newgroup test.a y é
Ok
% tail -n1 ~/db/active.times
test.a 1252702472 é
Should we also check for a valid UTF-8 reason in "ctlinnd pause",
"ctlinnd readers", "ctlinnd reject" and "ctlinnd throttle" commands?
As well as "nnrpd -r"?
As a matter of fact, the given reason will be displayed to readers...
No need to check for that in "ctlinnd allow", "ctlinnd go",
"ctlinnd reload", "ctlinnd reserve", "ctlinnd shutdown" and
"ctlinnd xabort".
--
Julien ÉLIE
« Quinze ans de légion et être bleu ! » (Astérix)
More information about the inn-workers
mailing list