I'm calling bash from cmd.exe like this
c:\cygwin\bin\bash --login -c "echo ф"
and get on Cygwin 2.8.0
/usr/bin/bash: echo ф: command not found
It treats the parameter as part of the command name. Doing the same on Cygwin 2.5.2 I get the output ф
.
Best Answer
Since this used to work, and works fine for people running bash on Unices (I tested on Debian here), I think you've found a Cygwin bug. The Cygwin project has a page about reporting Cygwin bugs. They have a bunch of useful information and steps there, far too long to summarize here.
In the meantime, I suspect you can work around this by escaping the character. Bash's
echo
, when given the-e
flag, interprets various escape sequences:should work. Hexadecimal
D1 84
is the UTF-8 encoding of ф. If you have theunicode
tool, it'll tell you—but so will just echoing the character tood
orxxd
:The Cygwin FAQ tells me it uses UTF-8 by default, so that should work. But of course you can use other encodings too (I think Windows mostly uses UTF16le):