Project

General

Profile

Open eCard App doesn't start if path contains "special" characters

Added by Daniel Trick over 3 years ago

Hello,

we have noticed that Open eCard App on Windows doesn't work at all, if the path to the program contains "special" characters, such as German umlauts.

For example:
  • "C:\Program Files (x86)\Open-eCard-App\Open-eCard-App.exe" → works
  • "C:\Program Files (x86)\Open-xyzCard-App\Open-eCard-App.exe" → works
  • "C:\Program Files (x86)\Open-üCard-App\Open-eCard-App.exe" → does not work!

Expected result: Open eCard App should start.

Actual result: Nothing happens at all. Apparently, the program starts and then terminates right away. No error message or anything. A log file is not created.

Tested with Open eCard App for Windows, version 1.4.5. Verified on Windows 10 (20H2), x64.

The ANSI Codepage for Non-Unicode-aware applications was set to "German" on the test machine, which makes this even more weird.

Best Regards
Daniel


Replies (3)

RE: Open eCard App doesn't start if path contains "special" characters - Added by Tobias Wich over 3 years ago

The observed behaviour is most likely caused by the jpackage launcher. After a directory rename, starting the batch file runtime/bin/open-ecard.bat works just fine, so it is not a problem in the Apps code.

If my assumption is correct, this problem only affects users who are modfying the installed software's path. Which is a bad idea anyway because then neither the uninstaller nor the update process or the start menu entries work.

RE: Open eCard App doesn't start if path contains "special" characters - Added by Daniel Trick over 3 years ago

Thank you for your reply!

In my experience, such problems are most often caused by native applications still using the "legacy" ANSI API (char) instead of the "modern" Unicode API (wchar_t). If an application uses the ANSI API, which charecters can be represented (or not) totally depends on the ANSI Codepage that is configured on the local Windows installation. I think that this might be the problem here, in the EXE launcher: Some characters in the install path cannot be represnted in the ANSI string. But Codepages can happen to be configured differently ond different systems. Just because the default installation path works on one system, there is no guarantee it will work for everyone. For me the "ü" caused the problem. For other people, with other (default) Codepage it could be other chars. Only real fix is to use the "modern" Unicode API - available for ~20 years now.

Anyway, if this is actually a bug in "jpackage launcher", it should probably be reported upstream. I assume, if it is reported by a "big" project like Open eCard it is more likely to get some attention ;-)

Best Regards
Daniel

    (1-3/3)