[Bug 932014] log functions crash with invalid UTF-8