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

Unfortunately my original patch for this issue still caused an exception for some characters, such as Umlauts.