log: Fix handling of Unicode messages