Fix logging with unicode.