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>