Bug 499337 - kcmutils_generate_desktop_file fails when path has non-ASCII characters in it
Summary: kcmutils_generate_desktop_file fails when path has non-ASCII characters in it
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kcmutils
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.10.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-30 17:53 UTC by ariasuni
Modified: 2025-02-04 20:50 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ariasuni 2025-01-30 17:53:47 UTC
SUMMARY
When I try to rebuild the official Arch Linux KWin package (6.2.5) on my machine, I get:

```
[ 78%] Built target kcm_kwin4_genericscripted
Could not open file "/home/ariasuni/dépôts/perso/kwin/src/kwin-6.2.5/src/kcms/compositing/kwincompositing.json"
make[2]: *** [src/kcms/compositing/CMakeFiles/kwincompositing-kcm-desktop-gen.dir/build.make:70: src/kcms/compositing/CMakeFiles/kwincompositing-kcm-desktop-gen] Error 1
make[1]: *** [CMakeFiles/Makefile2:60933: src/kcms/compositing/CMakeFiles/kwincompositing-kcm-desktop-gen.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
```

However, it works when I switch to a folder whose path is only ASCII characters.

STEPS TO REPRODUCE
1. Compile KWin in a path with a non-ASCII character, for example `é`

OBSERVED RESULT
A build error.

EXPECTED RESULT
It builds fine.
Comment 1 Bug Janitor Service 2025-02-01 15:44:27 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kcmutils/-/merge_requests/251
Comment 2 Nicolas Fella 2025-02-04 20:50:49 UTC
Git commit d71baa06c8aa880e3c1fb8edd897fb9a720ca55e by Nicolas Fella.
Committed on 04/02/2025 at 20:45.
Pushed by cullmann into branch 'master'.

[kcmmetadatagenerator] Use QCoreApplication to process args

They might contain non-latin1 letters, so using fromLatin1 is
wrong.

QCoreApplication has logic to handle this correctly on all
platforms, so use that

M  +5    -2    tools/kcmmetadatagenerator.cpp

https://invent.kde.org/frameworks/kcmutils/-/commit/d71baa06c8aa880e3c1fb8edd897fb9a720ca55e