Skip to content

Fix passing of non-ASCII characters as command-line arguments #127

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

lassoan
Copy link
Member

@lassoan lassoan commented Jul 29, 2022

@lassoan lassoan requested a review from jcfr July 29, 2022 22:32
@jcfr
Copy link
Member

jcfr commented Jul 30, 2022

Overall looks great 👍

It the use of QLatin1String instead of QString::fromLatin1 for stylistic reason ?

@lassoan
Copy link
Member Author

lassoan commented Jul 30, 2022

It the use of QLatin1String instead of QString::fromLatin1 for stylistic reason ?

Yes, I just chose QLatin1String because it indicates that it is simply a constant definition and it is not a conversion.

I could not test it (just the compilation), so it would be great if you could test it on Linux as described here.

@jcfr
Copy link
Member

jcfr commented Jul 31, 2022

Thanks for the detailed explanation. I will test tomorrow and then move forward with creating a new release.

@achataigner
Copy link

Would it be possible to merge this branch ?
It would simplify my work which uses slicer python interpreter: https://discourse.slicer.org/t/python-interpreter-arguments-containing-special-characters/33466

@achataigner
Copy link

achataigner commented Jan 10, 2024

Any feedback ? @jcfr

@lassoan
Copy link
Member Author

lassoan commented Apr 7, 2024

@jcfr jcfr force-pushed the fix-utf8-args branch from 872e8df to 1aa735b Compare July 2, 2024 14:04
@lassoan
Copy link
Member Author

lassoan commented Mar 7, 2025

I've added a fix that also fixes passing special characters in command-line arguments and fixes the issue of not being able to launch Slicer in a path that contains special character (Slicer/Slicer#8229).

…Windows

Application path and command-line arguments can now contain special characters.

Note: console launcher on Windows still has not been fixed. wmain would need to be used instead of main and wide characters should be converted to utf8.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants