记一笔,关于 syslogd
syslogd 的 -8 参数可以让汉字通过。以下摘自 manual page:
-8 Tells syslogd not to interfere with 8-bit data. Normally syslogd
will replace C1 control characters (ISO 8859 and Unicode
characters) with their "M-x" equivalent. Note, this option does
not change the way syslogd alters control characters (see
iscntrl(3)). They will always be replaced with their "^x" equiv‐
alent.
不过这事有点坑人,为啥默认不 -8 呢?出于安全方面的原因吗?差点就开始改代码了……