fix handling of UTF8 characters in log messages

this fixes #120