Fix non-ASCII input in non-GUI frames on MS-Windows. (Bug#12055)