Syslogd Cyrillic symbols issue

Hello everybody.
Got some issue with syslogd and messages which contain Cyrillic symbols.
Syslog turns it in some unreadable garbage.
There is a device that sends Cyrillic messages to syslog, it's realy hard to understand what does it mean.

Have made some test writing the same message to syslog localy from Perl via Sys::Syslog and using logger tool.
That gave me the same result like device do...

perl test-cyr.pl cyrtest-perl "message: Кирилиця"
logger -p local0.notice -t cyrtest-logger "message: Кирилиця"

File /var/log/messages got 2 lines
Code:
Jan 11 02:21:37 mrbook cyrtest-logger[27051]: message: �M-^Zи�M-^@или�M-^F�M-^O
Jan 11 02:25:31 mrbook cyrtest-perl[27175]: message: �M-^Zи�M-^@или�M-^F�M-^O
Locale of my user is "uk_UA.UTF-8".
To read that have to put that garbage through some sed combinations in ConvertSyslog.sh
Code:
sed 's/\xD1M-^@/р/g' | sed 's/\xD1M-^O/я/g' | sed 's/\xD0M-^Z/К/g' | sed 's/\xD1M-^F/ц/g'

sh ConvertSyslog.sh /var/log/messages | tail -2
Code:
Jan 11 02:21:37 mrbook cyrtest-logger[27051]: message: Кирилиця
Jan 11 02:25:31 mrbook cyrtest-perl[27175]: message: Кирилиця
Are there any options to fix this syslog's behavior?
--
WBR
 
Back
Top