tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Updating syslog(3), syslogd(8) to support RFC-5424

Am 19.03.11 12:40, schrieb David Laight:
> On Sat, Mar 19, 2011 at 09:41:15AM +0100, Marc Balmer wrote:
>> I agree that syslog should just log what it gets and not fiddle to much
>> with it.  fwiw, removing the "c &= 0177" is not enough, since some UTF-8
>> characters trigger the "iscntrl()" path.  E.g. the latin small letter a
>> with diaeresis is 0xc3 0xa4 and iscntrl() returns true for 0xc3.  So the
>> whole loop needs to be a bit rearranged.
> Except that you'd need a CBU (crystal ball unit) to determine whether
> anything further down the line would treat a value 0x80-0x9f as a
> control char or part of a UTF-8 sequence.

Yes, it's a mess, that is why I left it as is.  NetBSD 6 will have a
more modern syslog, but I am sure it will have it's own set of problems.

> UTF-8 should not have been allowed.

After all it's a transport format only.  And I think it is the best we
have for Unicode support in NetBSD.   Since the database (PostgreSQL)
and the GUI (OpenMotif) use UTF-8, my apps do so to.  On a side note,
NetBSD is a nice platform for multilingual applications.

Home | Main Index | Thread Index | Old Index