[Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-06 Thread cshu
Windows filenames (NTFS) may contain unicode characters. Passing the filename to `geany.exe` as command line argument does not open the file. At startup, it can get all arguments in UTF-16, and convert them to UTF-8. So filenames containing unicode characters can be passed to `geany.exe`. You

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-06 Thread cshu
Should work, regardless of locale settings. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1258#issuecomment-251909482

Re: [Github-comments] [geany/geany] Geany on Windows includes a grep.exe that cannot handle some unicode in filename (#1260)

2016-10-08 Thread cshu
I reproduced the `recursive directory loop` warning. And then tried forcing Geany to use git grep. It works without warning. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Github-comments] [geany/geany] Geany on Windows includes a grep.exe that cannot handle some unicode in filename (#1260)

2016-10-08 Thread cshu
I use Shift+Ctrl+F to do `Find in Files`. It failed when there are filenames with some unicode characters. I tried the `grep.exe` directly: ``` "C:\Program Files (x86)\Geany\bin\grep.exe" -nHIirF ring * grep: New folder/zhon??.txt: Invalid argument ``` The `??` are some unicode characters. I

Re: [Github-comments] [geany/geany] Geany on Windows includes a grep.exe that cannot handle some unicode in filename (#1260)

2016-10-08 Thread cshu
I tried changing `PATH` to force Geany to use `C:\Program Files\Git\usr\bin\grep.exe`. `File in Files` works now. Just need to change the grep executable. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Github-comments] [geany/geany] Geany on Windows includes a grep.exe that cannot handle some unicode in filename (#1260)

2016-10-08 Thread cshu
Not sure. Is it related to symlink? I don't know how it's produced. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/1260#issuecomment-252420395

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-14 Thread cshu
I created the pull request mainly for the convenience of "open with" Geany on Windows On the other hand it should be very rare for Geany's installation path to contain unicode character. And I'd like to let geany launch as fast as possible when I press Win+R and type `geany`. So I avoided the

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-28 Thread cshu
I moved most code to win32.c, and included argv[0] in conversion. Different file systems can use various encoding for filenames. (NTFS, FAT32, etc.) But `CommandLineToArgvW` always provide filenames in UTF-16. So in the case of windows api functions, underlying file system usually should not be

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-27 Thread cshu
@cshu pushed 1 commit. e9e7c11 most-logic-in-win32 -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/geany/geany/pull/1258/files/1dd0769d7ea77eb54af0a61238370c95e56cec9f..e9e7c117be223e23e05ea9e0f97b00ecb17a4afc

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-10-16 Thread cshu
This can be reproduced when filename character is not supported by system locale's encoding. E.g. When system locale is "English (United States)", double clicking `read我.txt` opens an empty tab in Geany with name `read?.txt`. The file is not really opened. -- You are receiving this because

Re: [Github-comments] [geany/geany] Provide utf-8 command line arguments on Windows (#1258)

2016-12-06 Thread cshu
@eht16 No, I leave it to you. This PR is a small change. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/1258#issuecomment-264706407