On Thursday 6 June 2024 08:07:31 GMT-7 Giuseppe D'Angelo via Development wrote: > Again, I'm not really sure of entangling consoles with this. > If you go for this approach and std::print a QString on Windows, what > kind of output do you get?
Garbage.
Terminal-printing on Windows is fatally broken unless the Windows application
opts in to UTF-8 support. That's the application, not a library.
The problem with terminals on Windows is that they use the even older DOS
codepage, not the legacy Windows 8-bit CP_ACP codepage. We do not support the
DOS codepage in Qt at all.
qDebug() << u"\u00e4";
printf("\xe4\n");
On a standard Windows, the first line will print the same as the second: byte
0xE4. But instead of the LATIN SMALL LETTER A WITH DIAERESIS, you'll see a
sigma symbol.
Therefore, please ignore terminal printing on Windows until UTF-8 is deployed
there. Which means we can assume terminals are always UTF-8 too.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Principal Engineer - Intel DCAI Fleet Engineering and Quality
smime.p7s
Description: S/MIME cryptographic signature
-- Development mailing list [email protected] https://lists.qt-project.org/listinfo/development
