It seems that GetParameters function, which is shipped with NSIS 2.39 via FileFunc.nsh, will return an incorrect result in some special situation.
BASIC INFORMATION:
1. NSIS Version: 2.39 Release
2. Error Message: No, but i got an incorrect result.
4. Screenshot: No
REPRODUCE OF THIS BUG:
1. Get a copy of NSIS 2.39
2. Try to compile the ``example.nsi'' attachment
3. Place a output executable in a path which contains non-ascii (eg. Chinese, Japanese, Korean) characters
4. Double click on output executable, an you will get a character instead of *EMPTY*
Note: here is an example of path that contains Chinese character:
C:\桌面
(you might see strange character due to the limit of fonts or something else)
ANALYZE OF THE BUG:
On the 1427th line of FileFunc.nsh the code uses ``StrCmp $0 '' end -3'' to check whether the string comes to the end (reach '\0'). But it seems this code does not work correctly when $0 is an non-ascii character. And then later, the code jumps to line 1442 and push incorrect result to the stack.
SOLUTION:
Change the GetParameters function code to the version which i have rewritten. i have rewritten the code so that GetParameters will be capable of handling Chinese characters (and it should work with Japanese and Korean but i haven't tested it).
RELATED BUG:
https://sourceforge.net/tracker/index.php?func=detail&aid=2017066&group_id=151265&atid=780537
Regards,
__h.s.
Logged In: YES
user_id=1563331
Originator: YES
File Added: example.nsi
Example to reproduce the problem
Logged In: YES
user_id=1563331
Originator: YES
File Added: FileFunc-patched.nsh
Logged In: NO
OTHER RELATED BUG:
BUG#1856414
Bug#1852141
Logged In: YES
user_id=1563331
Originator: YES
File Added: FileFunc-patched-v2.nsh
FileFunc.nsh which is patched (version 2)
Logged In: YES
user_id=1563331
Originator: YES
File Added: FileFunc-patched-v2.nsh
New GetParameters function (version 2)
Logged In: YES
user_id=1563331
Originator: YES
File Added: GetParameters-rewritten-v2.nsh
Thanks, fixed. I had to do some modifications to your code so it works like the old in some cases. I've built a stronger test suite for this purpose in FileFuncTest.nsi.