Menu

#10 Error When the Path Contains CJK Characters

closed-fixed
nobody
None
5
2009-04-16
2008-07-13
No

It seems that the same problem comes back. After tracking the code, i found that ${GetParameters} has some error which will lead to incorrect return.

Here comes the steps to reproduce the error:

1. Install "Firefox Portable" in a path contains cjk characters, such as ``C:\桌面''. (Note: you might not be able to see the Chinese character typed in this page)

2. Double-Click on "FirefoxPortable.exe"

3. On the first launch, "FirefoxPortable.exe" will execute itself in order to show the License Page and Session Manager Page.

4. However, when the file path contains cjk characters, ${GetParameters} might return incorrect value which is not equal to "SHOWLICENSE". And in the called "FirefoxPortable.exe" will execute itself to show the License Page and Session Manager Page. (Return to Step 3, Infinate Loop)

5. At last, the space of ram are limited, so Windows denied the request for "FirefoxPortable.exe" and caused a NSIS Error.

Analyze of this Bug:

It seems that the "GetParameters" function provided by FileFunc.nsh has an error. This function processed cjk characters in an incorrect way and returned the incorrect result. The "GetParameters" function which is used in Firefox Portable previous version is correct; this version of GetParameters function works correctly with cjk characters.

Temporary Workaround:

Remove "!insertmacro GetParameters" statement, instead include the GetParameters.nsh (at the attachment).

Permanent Solution:

i am going to raise a bug report at NSIS forum and hope that this problem can be fixed in the future.

Regards,
____hobbyscripter

Discussion

  • hobbyscripter

    hobbyscripter - 2008-07-13

    GetParameters function which is used in previous version.

     
  • John T. Haller

    John T. Haller - 2008-08-14

    Logged In: YES
    user_id=1176140
    Originator: NO

    Did you submit this to NSIS? I'd like to get it fixed upstream so we don't have to worry about it anymore.

     
  • John T. Haller

    John T. Haller - 2008-09-07

    Logged In: YES
    user_id=1176140
    Originator: NO

    Excellent. I'm now monitoring that bug for updates. In the meantime, I've adapted your code to a simple macro called GetParametersUnicode that's called the same way as GetParameters. I've been using it for each release since you re-brought this to my attention. For example, you can grab the current Miranda IM release to see it. Once NSIS fixes this upstream, I'll switch the launchers back to using the built-in GetParameters.

    Thanks for your work on this hobbyscripter.

     
  • John T. Haller

    John T. Haller - 2009-04-16

    This is now fixed in NSIS and fixed in Firefox, Thunderbird, etc.

     
  • John T. Haller

    John T. Haller - 2009-04-16
    • status: open --> closed-fixed