go: x/crypto/ssh/terminal: ReadPassword does not support umlauts on Windows
What version of Go are you using (go version)?
go version go1.9.2 windows/amd64
Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (go env)?
set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\development\go
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0
set CXX=g++
set CGO_ENABLED=1
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
What did you do?
Execute this on Gist on Windows (https://gist.github.com/levrik/99210259065679da20c3c66ef383eea9) and enter some umlauts in the password prompt (e.g. ö, ü or ä).
What did you expect to see?
(Screenshot taken on go version go1.9.2 darwin/amd64)
What did you see instead?

This was discovered when a colleague tried to use a new version of an internal command line tool and it didn’t accept the correct password anymore (password was supplied via command line flag before).
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 22 (11 by maintainers)
Commits related to this issue
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to bored-engineer/ssh by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to bored-engineer/ssh by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to golang/term by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to c-expert-zigbee/crypto_go by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to c-expert-zigbee/crypto_go by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to LewiGoddard/crypto by mattn 7 years ago
- ssh/terminal: handle non-ASCII characters when reading passwords ReadPassword uses Windows ReadFile to read from console handle. But ReadFile does not split input into UTF-8 characters, so ReadFile o... — committed to BiiChris/crypto by mattn 7 years ago
This should fix the issue.