[Development] Shall we turn on /utf-8 compiler option when build qt for Windows?

Simon Hausmann Simon.Hausmann at qt.io
Wed Feb 1 14:17:50 CET 2017


Hi,


Apart from André's imaginary wall ;-), I wonder if we can take this statement and

change the "Conventions in Qt source code" part of


    http://wiki.qt.io/Coding_Conventions


from


    "All code is ascii only (7-bit characters only, run man ascii if unsure)"


to


    "All code is utf-8 only"


and remove the first bullet point?


Or alternatively an edit by somebody with more expertise would be appreciated of course :)


Simon



________________________________
From: Lars, Knoll
Sent: Monday, January 30, 2017 12:48:09 PM
To: Simon, Hausmann
Cc: Viktor, Engelmann; Qt development mailing list
Subject: Re: [Development] Shall we turn on /utf-8 compiler option when build qt for Windows?


On 30 Jan 2017, at 12:23, Simon, Hausmann <Simon.Hausmann at qt.io<mailto:Simon.Hausmann at qt.io>> wrote:


Making a warning go away for compilers that we know support utf-8 may not come at the price of your life :)

I for one am all in favor of requiring just the Qt source code (not talking about customer code) to be encoded in a 24 year
old standard and add all the necessary flags to the compilers to make them understand it instead of producing a warning.

We practically support three different front-ends: GCC, clang and MSVC. All three - MSVC with the help of an option - can
grok UTF-8. Let's use it at least inside Qt :)

+1. Let's enable it.

Btw, this had actually been planned for Qt 5.0. Unfortunately we couldn't implement it back then, as MSVC was not allowing us to set the input encoding to utf8.

Cheers,
Lars


Simon
________________________________
From: Development <development-bounces+simon.hausmann=qt.io at qt-project.org<mailto:development-bounces+simon.hausmann=qt.io at qt-project.org>> on behalf of Viktor Engelmann <viktor.engelmann at qt.io<mailto:viktor.engelmann at qt.io>>
Sent: Monday, January 30, 2017 12:06:19 PM
To: development at qt-project.org<mailto:development at qt-project.org>
Subject: Re: [Development] Shall we turn on /utf-8 compiler option when build qt for Windows?


Am 30.01.2017 um 11:40 schrieb Giuseppe D'Angelo:
> Il 30/01/2017 11:35, Viktor Engelmann ha scritto:
>> As far as I can see, all our codes *are* UTF-8 encoded (a least they
>> should be, IMHO), so why would we sneak our UTF8 in behind it's back (in
>> 2017!) instead of just telling the compiler the encoding we are using?
> So *all* of our compilers happily support UTF-8 encoded sources?

I wouldn't bet my life on that (especially not for windows!)

--

Viktor Engelmann
Software Engineer

The Qt Company GmbH
Rudower Chaussee 13
D-12489 Berlin

Viktor.Engelmann at qt.io<mailto:Viktor.Engelmann at qt.io>
+49 151 26784521

http://qt.io<http://qt.io/>
Geschäftsführer: Mika Pälsi, Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin
Registergericht: Amtsgericht Charlottenburg, HRB 144331 B


_______________________________________________
Development mailing list
Development at qt-project.org
http://lists.qt-project.org/mailman/listinfo/development
_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20170201/32047851/attachment.html>


More information about the Development mailing list