qmlcachegen: Read response files as UTF-8


The response file that CMake generates for qmlcachegen's loader
generation is always UTF-8 encoded, because CMake handles strings as
UTF-8 internally on all platforms. qmlcachegen decoded it with
QString::fromLocal8Bit(), which on Windows uses the ANSI code page.
With a non-ASCII resource path such as "Bäh.qml", the loader then got
a different mangled name than the compilation unit, whose path is
passed on the command line. The link failed with undefined symbols,
and the runtime lookup key was wrong as well.

This showed up when building tst_qmlcachegen on a Windows host for a
UNIX target.

Decode the response file as UTF-8 instead, so that qmlcachegen
generates the same identifiers on every host platform.

Fixes: QTBUG-151666
Pick-to: 6.12
Change-Id: I7d0e138d92d0a810ebb09325b14da8ac7138be51
Reviewed-by: Seokha Ko <seokha.ko@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
commit9e982fd66024c68725b2b9118299882e8376b7dd
parent19ae96f7b4e82d9f994018b76ba478380bf84696
authorSukyoung Oh <sukyoung.oh@qt.io>
committerSeokha Ko <seokha.ko@qt.io>
commit timeTue, 20 Oct 2026 17:56:09 +0000