sh icon indicating copy to clipboard operation
sh copied to clipboard

gosh: Windows Unicode

Open 89z opened this issue 3 years ago • 3 comments

Using a three byte character:

∞ (U+221E) (Alt + 236)

I can paste or enter with no problem:

PS D:\Desktop\sh-master\cmd\gosh> .\gosh.exe
$ ∞
"∞": executable file not found in $PATH
$ ∞
"∞": executable file not found in $PATH
$ ∞
"∞": executable file not found in $PATH

but four byte character:

😀 (U+1F600)

Fails:

$ ��
"😀": executable file not found in $PATH

89z avatar Mar 09 '22 00:03 89z

I'm not sure how this could be a bug in our code - our prompt is really just printing $ and then reading input bytes until a newline. Do we need to do anything special to properly support all of Unicode on windows?

mvdan avatar Mar 09 '22 07:03 mvdan

I know that Windows uses UTF-16 in some places, so that could be it. I found another Go shell that works, if it helps:

https://github.com/lmorg/murex

89z avatar Mar 09 '22 13:03 89z

I'm going to label this "help wanted" because I'm still not sure what needs to be done.

mvdan avatar Mar 28 '22 21:03 mvdan