Bug fix: UTF-8 formatting mangled on Windows (Issue #342)