Qt6 sets UNICODE on Windows
Yu Jin
yu_jin at lyx.org
Sat May 29 08:57:01 UTC 2021
Am Sa., 29. Mai 2021 um 10:22 Uhr schrieb Kornel Benko <kornel at lyx.org>:
> Am Sat, 29 May 2021 09:56:06 +0200
> schrieb Yu Jin <yu_jin at lyx.org>:
>
> > this is connected to the Beta 1 tarballs, trying to build LyX I stumbled
> > across this:
> > [image: grafik.png]
> > Apparently Qt6 sets UNICODE and _UNICODE on LyX (and only on LyX) when
> > configuring without LYX_CONSOLE. It does that by setting the character
> set
> > to Unicode (as shown in the screenshot above) and it also sets the
> > "UNICODE" and "_UNICODE" preprocessor definitions manually. Qt5 does not
> do
> > that. I have just tried to manually change the character set and remove
> > those definitions in Visual Studio and it worked just fine. Any Idea if
> > this is intended by us or how we can prevent it? Maybe in CMake?
>
> The only setting for UNICODE i see is in
> development/Win32/vld/cmake/CMakeLists.txt
> This is used, if LYX_VLD is set. But this should be OFF on default.
>
Thank you for your response. Actually it is Qt6 after all, I just tested on
a minimal example, it seems that Windows GUI applications are indeed
defaulted to UNICODE on Qt6. I also just found in the keynote here:
https://www.qtdesktopdays.com/wp-content/uploads/2020/09/keynote.pdf
QtCore classes can now only deal with Unicode encodings
–For other encodings: QTextCodec in Qt5Compat
Don't really understand what that really means for LyX. But Qt5Compat is
used, so I hope it will be fine. I will ask in the Qt Forum how the UNICODE
default can be deactivated.
--
Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lyx.org/pipermail/lyx-devel/attachments/20210529/d9c7c80a/attachment.html>
More information about the lyx-devel
mailing list