(i18n): support accents in sight paths
Summary
- If there are accents in the application path, they don't launch or crash
- Applications without GUI (without Qt) seems to work (
VersionGenerator
for example)
Steps to reproduce
- launch a graphical application in a folder with accents
Dev environment
- OS: Linux (not tested on other OS)
- CMake version: 3.17.3
- Compiler: gcc8
- Build type: debug
- Commit: branch 492-fwruntime-remove-usage-of-deprecated-methods (to have the fix on the installers)
What is the current bug behavior?
- crash or freeze
What is the expected correct behavior?
- no crash/freeze
Relevant logs and/or screenshots
- With Tuto01Basic:
When you start the tutorial, there's a crash (core dump)
~/Dev/install/Tuto01Basicéééèèè$ ./bin/tuto01basic.sh
ASSERT failure in getRelocatablePrefix: "Failed to find the Qt prefix path.", file /home/sight/.conan/data/qt/5.14.1/sight/stable/build/c84ed286c37bce7734454250b3e393fa287d7449/qt5/qtbase/src/corelib/global/qlibraryinfo.cpp, line 620
Abandon (core dumped)
- With VRRender:
When you start VRRender, there's a freeze and the app is not displayed
~/Téléchargements/VRRender-0.9-linux_x86_64-Sight_19.0.0-1500-g614bc623dd$ ./bin/vrrender.sh
[1][00:00:00.132575][error] /home/mschweitzer/dev/sight/src/sight/libs/core/fwRuntime/src/operations.cpp:203: Could not find bundle 'fwActivities' with version '0.1'
Possible fixes
- to investigate
🤷 - seems to be a Qt issue
No it seems it is not a Qt issue. Our best idea is this code:
setlocale(LC_ALL, "C"); // needed for mfo save process
QLocale::setDefault(QLocale::C); // on Linux we need that as well...
According to the ancients, this is certainly a "workaround" to manage correctly the case with the numeric separator (,
and .
).
We need to evaluate if this two lines are still required, and if yes, we need to find a better fix to handle correctly different numeric separators. One other possible solution, would be to change only LC_NUMERIC
, but how to do this in Qt is still to be discovered.
We strongly suggest to not change default locale, as it would certainly make internationalization of our application almost impossible for non latin1 language.