#847394 Fails when LC_CTYPE is not explicitly UTF-8