Fixed handling of non-ASCII characters in commit messages on Windows

See http://bugs.python.org/issue1759845