Re: [Development] RFC: Defaulting to or enforcing UTF-8 locales on Unix systems

2023-03-21 Thread Alvin Wong via Development

Hi,

Yes, embedding the manifest with activeCodePage set to UTF-8 is the only 
thing need to enable UTF-8 as the ANSI code page (ACP) for the process.


Qt itself should work fine after the bug in QStringConverter had been 
fixed [1] a while back. (You can also refer to the linked mail thread. 
[2]) However, as this bug has shown, any code that 
uses`MultiByteToWideChar` incorrectly or wrongly assumes that `CP_ACP` 
always refers to a charset in which each characters are formed by no 
more than two bytes will break. Therefore, before switching to UTF-8 as 
the ACP, application developers have to check their code and other 
libraries to make sure everything will still work properly after the switch.


[1]: https://codereview.qt-project.org/c/qt/qtbase/+/412208
[2]: https://lists.qt-project.org/pipermail/interest/2022-May/038241.html

About the CRT, it is true that only UCRT fully supports UTF-8 locale. 
When compiling with MSVC, you are almost always using UCRT so it should 
be fine.


MinGW-w64 is a bit more complicated -- when one gets a mingw-w64 
toolchain, the whole toolchain is already configured for a specific CRT. 
Usually it will be the system MSVCRT. (If it's configured for UCRT, the 
toolchain author will usually make it clear, because compiled programs 
will not run out-of-the-box on Windows 8.1 or earlier.) I did not run 
tests myself, but I would not trust MSVCRT to support UTF-8 ACP fully. 
mingw-builds [3] and llvm-mingw [4] are some examples of mingw-w64 
toolchains that ships UCRT versions.


[3]: https://github.com/niXman/mingw-builds-binaries/releases
[4]: https://github.com/mstorsjo/llvm-mingw

There are two more problems with enabling UTF-8 ACP using the manifest 
that I have encountered so far. When a process is running with UTF-8 
ACP, there seems to be no API available to get the native system ACP. 
This can be an issue if, for example some external tools write files 
using the system ACP and your program wants to read those files. The 
other problem (a mild annoyance) is that, some debuggers which isn't 
using updated APIs (gdb for example) does not capture 
`OutputDebugString` messages in the correct encoding, which affects 
QDebug output.


(Console output encoding is separate from the ACP, so one might also 
need to call `SetConsoleOutputCP(CP_UTF8)`, but the detail is a bit 
fuzzy to me.)


Cheers,
Alvin


On 20/3/2023 21:44, Edward Welbourne wrote:

Thiago Macieira (31 October 2019 22:11) wrote [0]:

This RFC (...) is meant to discuss how we'll deal with locales on Unix
systems on Qt 6. This does not apply to Windows because on Windows we
cannot reasonably be expected to use UTF-8 for the 8-bit encoding.

[0] https://lists.qt-project.org/pipermail/development/2019-October/037791.html

The GNU make mailing list currently has a thread (starts at [1]) about
handling of encodings on Windows.

[1] https://lists.gnu.org/archive/html/bug-make/2023-03/msg00066.html

The discussion there seems to indicate that setting the system code-page
to UTF-8 can be done in a way that interoperates gracefully with other
processes and the file system, presumably thanks to the system being
substantially UTF-16-based, so all 8-bit encodings go via that anyway.

The means to achieve this appear [2] to hinge on setting the active
codepage for the application in a manifest file, that it gets combined
with after it is linked.

[2] 
https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

There do appear to be some vagaries still, it may depend on UCRT and I'm
not sure I've really understood it all, but it looks like we may, in
time, be able to consistently use UTF-8 as 8-bit encoding on Windows.

Eddy.


--
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


Re: [Development] RFC: Defaulting to or enforcing UTF-8 locales on Unix systems

2023-03-21 Thread Ilya Fedin
On Mon, 20 Mar 2023 13:44:30 +
Edward Welbourne via Development  wrote:

> The means to achieve this appear [2] to hinge on setting the active
> codepage for the application in a manifest file, that it gets combined
> with after it is linked.
> 
> [2]
> https://learn.microsoft.com/en-us/windows/apps/design/globalizing/use-utf8-code-page

setlocale has support to set UTF-8 locale as well:
https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/setlocale-wsetlocale?source=recommendations=msvc-170#utf-8-support
-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] Qt 6.5.0 RC released

2023-03-21 Thread Jani Heikkinen via Development
Hi all!



We have released the Qt 6.5.0 RC.  As earlier you can get it via online 
installer. As usual src packages are also available in the Qt Account and in 
download.qt.io. Please make sure you report all findings in Jira. And please 
inform me immediately if you find something new, which should be fixed before 
the final release.



Delta to the beta3 as an attachment.



br,

Jani Heikkinen

Release Manager

qt5.git
73d7bba181229cfe63cd5d739cfcc711a6316cd6 Adjust submodule branches
4258273614776e38b9a389673cd968663b79 Provisioning: Update 
qdoc/qtattributionsscanner binaries on Ubuntu 22.04
d64669c50bedab607ca20e639fcd06253ed2bd61 Provisioning: add Android SDK, NDK and 
openSSL to Ubuntu22.04
qt3d:
9f849d32179b53f93b89ccfc57742704afb8d54f Merge both controls based examples
cf5ecac04337a89c10fe59ff96d2c383b38d657c Move some examples to manual tests
ee7b8550a18c3a59f5741aad98ee19e55d852cf7 Exclude Assimp from Unity Build
80274a4f92294cc1de8812234b174b4d4bed9176 OpenGL SubmissionContext: reset 
m_renderTargetFormat for default FBO
90266759fa40effe242f830375ce482d1f0750c2 Remove scene2d example and manual test
c068cebb6b7f3d3ccc336df552ec8a62a8994bf8 TriangleCollisionVisitor: perform 
intersections tests in local space
qt5compat:
af022fce5eec226a2468f67b39cf02e79a059c1f Remove an unused enum
qtactiveqt:
da025dc3faa3dc048cbe75dbbe00f2fc6fb17d8b idc: Sync usage info with actual 
parameter parsing
e2e05dbcfb9836a50dc51b4ad75518495d7e723f Doc: Define WINAPI for documentation 
builds on non-Windows platforms
qtbase:
ce891ca3e498cb3310318fdf752a66add7a8e050 Doc: Remove broken link to Anchor 
Layout Example
257eaa6408aeb965ceaeee2bb61dfd65e65e3e28 Imagescaling example: fix memory leaks
b68ad5ef7fd8df0ef4aea03f33dfe05fd8272469 QMetaType: Ensure that qfloat16 gets 
correct id
973f499cca4d5017c902249361ec02e025e148cf Fix listed files for sha3_keccak
7d86115a17705f1804b3b697fae15cafb733f797 QVariant: fix comparisons between 
strings and integer 0
f4b1a9b8bdfc50166c0773ccfee0f6f2c0e4a16f Make it possible to use 
QObjectPrivate::connect in private code
ae3046258521dd0bb0580afa9ed1c50794a49009 Fix overflow in SHA-3/Keccak
7a56f8b974c86eb71f430e30f4170718ec26 Doc: fix more links to cmake functions
e64eaf57f31d40e8ac635527e51f1ca147d472d3 QTypeInfo: move helpers in QtPrivate 
namespace
42612b0180fb91a275ca2c83b14a45d9ac5d37c3 tst_QCryptographicHash: Extract Method 
ensureLargeData()
def0024f985e70f8d6ec4f51f91ebb2d8b1c6bb2 Example: remove map example
1a8e1d41700db16a4b8a068f6c074b7046bf358a Make compare(QU8SV) a non-template, 
document it
0c2bd257123e3df0bf38906620b955bb5d9c1f1d Example: remove runfunction example
9ef8020ddebe502c2c5de53eb10492b2aeed8a1d QCborValue: add missing 
Q_DECLARE_OPERATORS_FOR_FLAGS
2828b3fdca316aed449cdce8af3545c018d9444a Doc: Update docs to reflect method 
being renamed
ec3aac74a4812b18e483f524e991e9e0bbcd0bdb Plumb QMessageBox::setCheckBox() 
through QPlatformMessageDialogHelper
dcf7247e0572768cf085f7394747ad1675549469 QErrorMessage: Reset 'again' check box 
between each error message
cb14d0ec7f4e427c444fcdc4163c69ad82c60731 docs: Remove side panel and swipe to 
remove examples
7b44f7181b5ab60cf1a4006fda61bd9a1e9805ff Doc: Fix keyword for CMake commands 
related to deployment
124cd8824240172e9121aa3a21da835f7798ffc4 Doc: use () in references to cmake 
functions
eced0ccefc0763f792ff6f0523771cb78c45727c CMake: Fix xmlstreamlint to use the 
manual test api
805f40924e2ff6949eebc93857866d9b02129982 macOS: Use non-native app modal 
message box from nested event loops
556a56104e64ccb8f18c3605ee21e3bc170a3cd3 Move anchor layout example to manual 
tests
74078c5fc6a0031e5c4ffdabfc1001bc1b154bdc Doc: fix 
QOpenGLWidget::defaultFramebufferObject documentation
d3edb6562029be5b4e5ee44ad7f9a2a003bdbb44 Doc: Fix syntax error
2e1233d3ecd2dcc6c33a7a175e90f778f1b736d8 Doc: fix link to QTest::failOnWarning
908b5ebdc9601f16716cc36de8075cce7fa50735 Doc: fix links to changed or renamed 
i18n pages and sections
9ab1c941112faf679f07ba462f80cc21ee002faa qsimd_p.h: remove LZCNT feature from 
the ARCH_HASWELL list
e230713f8cc7654bee7dddf5bb8790d9e4cc09e3 qmake: Resolve target suffix based on 
Qt build config for static plugins
d5921e7376d94ad2c1199f67cb2edfffdc5641ea Doc: fix links to qFuzzyIsNull
eaec9459234520db24a88143bdd21ab86543d5b2 Doc: fix qdoc warning, explicitly 
qualify enum type
959d3397293c59194f85329e485de3e3d5c65e38 Fix build with -no-feature-lineedit
b5fa546f5f909b3f88bf909ca1f186f2b0b68780 Doc fix in QIntValidator::validate() 
and comment on a test
eec2fb9380e5dcf007de46d3eec517b537284eec Simplify and relax UTF-8 locale 
override machinery for Darwin
f56646d6c108cd0b4fd09e5213920b41ff231952 QCoreApplication::initLocale(): 
Improve warning on failure
e1d4583a0c47348b6dbdc8a90bb4b3e9f7cb198d GL paint engine: Fix 
drawPixmapFragments when using buffer objects
6f96d1785f35520607eff4ace0086d17db7b432e Move xmlstreamlint example into 
tests/manual
baaed3faa719f93656b7fe277eb9950a0c7983be Move 

Re: [Development] Nominating Tinja Paavoseppä as an approver for the Qt Project

2023-03-21 Thread Paul Wicking via Development
+1

Changes: https://codereview.qt-project.org/q/owner:tinja.paavoseppa%2540qt.io
Reviews: https://codereview.qt-project.org/q/reviewer:tinja.paavoseppa%2540qt.io

On 21 Mar 2023, at 08:50, Nicholas Bennett via Development 
 wrote:

Hi all,

I'd like to nominate Tinja Paavoseppä as an approver for the Qt Project.

Tinja is  a seasoned developer who has been a Qt user for many years.
Her work with coding, documenting and approving for the Qt for Android 
Automotive project has been exemplary.

I  trust she will bring the same diligence to reviewing the Qt Framework.

disclaimer: We work in the same team.

Cheers,
Nicholas Bennett
Senior Documentation Engineer
Qt Group
Tutkijantie 4C
FI-90590 Oulu
Finland
nicholas.benn...@qt.io
+358503231959
www.qt.io
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/Qt-Group-logo-black.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/facebook-x2-right_2023-03-01-095511_zhlr.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/twitter-x2.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/linkedin-x2.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/youtube-x2.png]

--
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development


[Development] Nominating Tinja Paavoseppä as an approver for the Qt Project

2023-03-21 Thread Nicholas Bennett via Development
Hi all,



I'd like to nominate Tinja Paavoseppä as an approver for the Qt Project.



Tinja is  a seasoned developer who has been a Qt user for many years.

Her work with coding, documenting and approving for the Qt for Android 
Automotive project has been exemplary.



I  trust she will bring the same diligence to reviewing the Qt Framework.


disclaimer: We work in the same team.

Cheers,
Nicholas Bennett
Senior Documentation Engineer
Qt Group
Tutkijantie 4C
FI-90590 Oulu
Finland
nicholas.benn...@qt.io
+358503231959
www.qt.io
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/Qt-Group-logo-black.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/facebook-x2-right_2023-03-01-095511_zhlr.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/twitter-x2.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/linkedin-x2.png]
[https://s3.eu-north-1.amazonaws.com/email-signature-tool-leroy/youtube-x2.png]

-- 
Development mailing list
Development@qt-project.org
https://lists.qt-project.org/listinfo/development