> -----Original Message----- > From: [email protected] [mailto:rsyslog- > [email protected]] On Behalf Of Sean Conner > Sent: Wednesday, November 03, 2010 4:52 PM > To: rsyslog-users > Subject: Re: [rsyslog] Feedback Request: NULs in strings? > > It was thus said that the Great Rainer Gerhards once stated: > > Hi all, > > > > once again (this time with libee/liblognorm and CEE) I ran into the > problem > > of C strings and NUL characters inside log data. > > > > I have written up a relatively small blog post here: > > > > http://blog.gerhards.net/2010/11/logging-and-c-nul-problem.html > > > > I would appreciate any feedback you have on the issue. I would also > > appreciate if you could point me to other places where I could ask > for > > feedback. I am totally undecided, but think this is a very important > issue > > (even though on a low detail level). > > What is the semantic meaning of a NUL? Because there are other > problematic characters (say, CTRL-Z under Windows) that can also cause > issues with the tool stream. Knowing how an ASCII NUL is used (or > meant to > be used) could help decide how to handle it.
The original US-ASCII semantic is a NOP (no-operation). NULs were used to stuff in extra bytes to give terminal devices (VT 100 and similar ones) some time to execute "more demanding" escape sequences (like clear screen). During processing these sequences, some input characters could be lost (especially at higher rates like 2,400 baud or above ;)). So NUL were sent as loss victims. However, this is not the problem. The semantic in the C context is that NUL is an indicator for "end of string". Rainer _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

