fixing character encoding for logging