Look what I found in
/var/log/debug recently (this is what it looks like when viewed with
less, and
$LESSCHARSET="utf-8"):
Code:
Feb 21 21:54:15 next gcr-prompter[2368]: GLib-GIO: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for <E2>M-^@M-^Xgio-vfs<E2>M-^@M-^Y
Now, is it just me, or wouldn't that line actually be supposed to look rather like
this?
Code:
Feb 21 21:54:15 next gcr-prompter[2368]: GLib-GIO: _g_io_module_get_default: Found default implementation gvfs (GDaemonVfs) for ‘gio-vfs’
Before I go and hunt this down any further, I'd like to know if this is a general Slack-15.0 problem, or a problem with my specific system. So, if you could you please verify the following on your own Slack-14.2 and/or Slack-15.0 systems and share your findings here, I'd be very grateful!
Now on to the facts ... on a newly installed Slack64-15.0 system,
syslogd seems to have a problem logging non-US-ASCII characters. I've been using Slackware since 1997 now, converted all my systems (terminals, fonts, X, filenames, file contents, ...) from ISO/Latin to Unicode on the fly back in the early 2000s, and this has
never been a problem so far:
Code:
[root@next:~]# logger -p debug -s -t test "iso/latin - öäüÖÄÜ߀¢§"; logger -p debug -s -t test "unicode - –…‘’•"; tail -2 /var/log/debug
<15>Feb 22 06:22:19 test: iso/latin - öäüÖÄÜ߀¢§
<15>Feb 22 06:22:19 test: unicode - –…‘’•
Feb 22 06:22:19 next test: iso/latin - öäü�M-^V�M-^D�M-^\�M-^_�M-^B�¢§
Feb 22 06:22:19 next test: unicode - �M-^@M-^S�M-^@��M-^@M-^X�M-^@M-^Y�M-^@�
When viewed with less, it looks like this:
Code:
Feb 22 06:22:19 next test: iso/latin - öäü<C3>M-^V<C3>M-^D<C3>M-^\<C3>M-^_<E2>M-^B<AC>¢§
Feb 22 06:22:19 next test: unicode - <E2>M-^@M-^S<E2>M-^@<A6><E2>M-^@M-^X<E2>M-^@M-^Y<E2>M-^@<A2>
On a Slack-14.2 system, it
Just Works™ as expected:
Code:
[root@disclosure:~]# logger -p debug -s -t test "iso/latin - öäüÖÄÜ߀¢§"; logger -p debug -s -t test "unicode - –…‘’•"; tail -2 /var/log/debug
<15>Feb 22 06:22:07 test: iso/latin - öäüÖÄÜ߀¢§
<15>Feb 22 06:22:07 test: unicode - –…‘’•
Feb 22 06:22:07 disclosure test: iso/latin - öäüÖÄÜ߀¢§
Feb 22 06:22:07 disclosure test: unicode - –…‘’•
A few random observations that might or might not make a difference: all my 14.2 systems are 32bit, the newly installed 15.0 one is 64bit. The characters are displayed fine on the terminal, and I used the
-s flag on logger to see if it receives & handles the characters properly, which does seem to be the case. Logging lower-case umlauts ä/ö/ü work fine, upper-case umlauts Ä/Ö/Ü are broken. Logging the Euro sign € is broken, cent ¢ works. Unicode
filenames also work as expected. When viewing/editing other files with Unicode
content with
less/vim/mcview, everything's fine as well. My locales are set properly, although
syslogd does not seem to make use of any of it (this is the same on both 14.2 and 15.0):
Code:
[root@next:~]# locale
LANG=en_US.UTF-8
LC_CTYPE=de_AT.UTF-8
LC_NUMERIC=de_AT.UTF-8
LC_TIME=de_AT.UTF-8
LC_COLLATE=C
LC_MONETARY=de_AT.UTF-8
LC_MESSAGES=en_US.UTF-8
LC_PAPER=de_AT.UTF-8
LC_NAME=de_AT.UTF-8
LC_ADDRESS=de_AT.UTF-8
LC_TELEPHONE=de_AT.UTF-8
LC_MEASUREMENT=de_AT.UTF-8
LC_IDENTIFICATION=de_AT.UTF-8
LC_ALL=
[root@next:~]# xargs -0 -n1 < /proc/$(pgrep syslogd)/environ | sort
BOOT_IMAGE=/vmlinuz-generic-5.15.19
CONSOLE=/dev/console
HOME=/
INIT_VERSION=sysvinit-3.01
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PREVLEVEL=N
PWD=/
RUNLEVEL=4
SHELL=/bin/sh
SHLVL=3
TERM=linux
_=/usr/sbin/syslogd
Edit: just tested: stopping & starting
/etc/rc.d/rc.syslog from a terminal with all the proper locales set doesn't make a difference. The locale settings do show up in
syslogd's environment, but the logging is still broken.
I have a 14.2 test system which I intend to upgrade to 15.0 Really Soon Now™, so I can check whether non-ASCII-logging breaks on upgrading as well. But until then, the whole thing begs the Grand Universal Question:
WTF?!