Got a few more details: at first, this is a problem in grep.exe (at least this one distributed with Geany, maybe other/better binaries are out there):
if I run the grep command on the cmd.exe, I also get the `grep: ./??????: Invalid argument` result. But in your screenshot you got those squares. ![win32_grep_unicode](https://cloud.githubusercontent.com/assets/617017/11814977/ed323d42-a349-11e...)
For futher testing, I created a directory with a German umlaut (`lalelö`). Result in cmd.exe: ![win32_grep_mixed_cmd](https://cloud.githubusercontent.com/assets/617017/11814994/022d542a-a34a-11e...)
Result in Geany: ![win32_grep_mixed_geany](https://cloud.githubusercontent.com/assets/617017/11814996/074105e2-a34a-11e...)
cmd.exe displays the folder name `lalelö` correctly but is not able to display correctly the UTF-8 encoded search result.
In Geany, the result is vice-versa: the folder name is displayed incorrectly but the UTF-8 parts are displayed properly.
So, related to #784, we probably need to convert the output from external commands back from UTF-16 to UTF-8. Though I doubt whether this can ever work properly if in the same output there is also UTF-8 encoded text. At least I have no idea how this could work.
For curiosity, I just tested grep.exe from the MSYS2 environment: ![win32_msys2_grep_mixed_geany](https://cloud.githubusercontent.com/assets/617017/11816518/041f3e2c-a351-11e...)
So yeah, MSYS2 grep.exe seems to work nicely with Geany. @NTMan it would be cool if you could test the grep.exe in the archive at http://repo.msys2.org/msys/x86_64/grep-2.22-1-x86_64.pkg.tar.xz. This is exactly the same as I used for the last test (verified with md5sum). I'm not sure whether this binary is supposed to work without a MSYS2 environment and I cannot test this.
--- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/783#issuecomment-164819917