For example Geany couldn't find text `Без названия`, but able find `Без` and `названия`
Screencast: https://youtu.be/uLKgI7ZkacI
reproduction:
1) switch console to UTF8 `chcp 65001 `
2) create folder c:\666 `mkdir "c:\666"`
3) Create example file file with text for search c:\666\example2.txt `echo "Без названия" > "c:\666\example2.txt"`
4) Try search text `Без названия` in Geany
Works here on Linux in a UTF8 locale, might be something to do with windows locales or encodings issues.
It might also be that windows sees the two words as separate arguments to grep since they are separated by a space (whereas Linux passes each command argument as a separate string, so internal spaces don't matter). Try enclosing the search argument in quotes(").
You mean this experiment (see below) ![13 01 2017 18-44-06-474](https://cloud.githubusercontent.com/assets/200750/21932064/6d390a54-d9c0-11e...)
Not works :(
What mean `Match only a whole word` option? Seems if enabled this option Geany can search text `Без названия`
![13 01 2017 18-53-40-884](https://cloud.githubusercontent.com/assets/200750/21932280/9e840dba-d9c1-11e...)
My conjecture turned out erroneous, search stops working if the text is not enclosed in double quotes
![13 01 2017 19-09-24-872](https://cloud.githubusercontent.com/assets/200750/21932769/0876d69c-d9c4-11e...)
![13 01 2017 19-36-00-370](https://cloud.githubusercontent.com/assets/200750/21933525/96178642-d9c7-11e...)
``` C:\Program Files (x86)\Geany\bin>chcp 65001 65001
C:\Program Files (x86)\Geany\bin>echo "Без названия" > "c:\666\example2.txt"
C:\Program Files (x86)\Geany\bin>grep -nHIiFR 'Без названия' C:\666
C:\Program Files (x86)\Geany\bin>grep -nHIiFR "Без названия" C:\666 C:\666/example2.txt:1:"▒▒▒▒▒▒ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒"
C:\Program Files (x86)\Geany\bin>copy "c:\666\example2.txt" con "Без названия" The handle is invalid. 0 file(s) copied.
C:\Program Files (x86)\Geany\bin>echo Без названия > "c:\666\example2.txt"
C:\Program Files (x86)\Geany\bin>copy "c:\666\example2.txt" con Без названия The handle is invalid. 0 file(s) copied.
C:\Program Files (x86)\Geany\bin>grep -nHIiFR 'Без названия' C:\666
C:\Program Files (x86)\Geany\bin>grep -nHIiFR "Без названия" C:\666
C:\Program Files (x86)\Geany\bin> ```
Looks like enclosing the search argument in quotes(") is right way, but quotes should not consider as beginning and ending of searching string in Windows version grep utility.
![14 01 2017 02-04-02-668](https://cloud.githubusercontent.com/assets/200750/21945566/c019c816-d9fd-11e...)
That would need to be reported to the grep program.
@NTMan what version of Geany? There were fixes for this in the latest release IIRC.
That would need to be reported to the grep program.
``` C:\Program Files (x86)\Geany\bin>"C:\Program Files (x86)\Geany\bin\grep.exe" --version grep (GNU grep) 2.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS. ``` Windows version grep maintain same developer (original version grep)?
what version of Geany? There were fixes for this in the latest release IIRC.
Geany 1.29 (built on or after Nov 13 2016) already have a newer version?
Geany 1.29 (built on or after Nov 13 2016) already have a newer version?
No, thats the latest release.
What happens when you search for two ASCII words separated by space?
What happens when you search for two ASCII words separated by space?
``` C:\Program Files (x86)\Geany\bin>echo Without name > "c:\666\example2.txt"
C:\Program Files (x86)\Geany\bin>grep -nHIiFR Without name C:\666 /Geany/bin/grep: name: No such file or directory C:\666/777/example.txt:4:Without name C:\666/example2.txt:1:Without name
C:\Program Files (x86)\Geany\bin>grep -nHIiFR "Without name" C:\666 C:\666/777/example.txt:4:Without name C:\666/example2.txt:1:Without name
C:\Program Files (x86)\Geany\bin>copy "c:\666\example2.txt" con Without name 1 file(s) copied.
C:\Program Files (x86)\Geany\bin> ``` With ASCII symbols it works as expected even with enclosing.
``` C:\Program Files (x86)\Geany\bin>echo Without name > "c:\666\example2.txt"
C:\Program Files (x86)\Geany\bin>grep -nHIiFR Without name C:\666 /Geany/bin/grep: name: No such file or directory C:\666/777/example.txt:4:Without name C:\666/example2.txt:1:Without name ```
This one is not finding `Without name`, its just finding `Without` see the first message, `name` was treated as a file to search in.
The second looks more correct.
![23 01 2017 17-50-49-823](https://cloud.githubusercontent.com/assets/200750/22204782/915fe10a-e195-11e...)
This problem is absent in grep version which shipped with Windows version git
``` C:\Program Files\Git\usr\bin>grep --version grep (GNU grep) 2.26 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
Written by Mike Haertel and others, see http://git.sv.gnu.org/cgit/grep.git/tree/AUTHORS. ``` Very interesting today update git, and new grep verison has same issue.
![image](https://cloud.githubusercontent.com/assets/25397614/22393914/9903b164-e4c6-1...)
@vleoned WTF?
github-comments@lists.geany.org