Syslog is sloppy with character-sets. Before logging a message, it should get translated into latin1 or real utf-8 explicitly. Besides, escape codes must get filtered, as the following script will demonstrate #!/usr/bin/perl use Sys::Syslog; openlog 'test', '', 'local0'; syslog err => "Test\a\033[2J\033[2;5m\033[1;31mHACKER~ ATTACK\033[2;25m\033[22;30m\033[3q"; (At least under Linux this has nice effects in de log-file) So: we need an option to explicitly specify in which character-set to write the syslog. Before translation, all non-printable need to be replaced by something else. Log-files are usually read by root, and it is simple to create an escape sequence which insert characters in the terminal input stream; be executed with super-user rights.