Fix bug #12082 with non-ASCII output in Windows GUI sessions.