<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
AFAICS (from the public coin logs that dump the entire set of environment variables), nothing specifically sets any of the locale environment variables. In fact, no variables are set. You can check for yourself for example from the macOS log from one of the
 recent qtbase dev integrations:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
    <a href="https://testresults.qt.io/coin/integration/qt/qtbase/tasks/1588073951" id="LPlnk541261">https://testresults.qt.io/coin/integration/qt/qtbase/tasks/1588073951</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
The regular Apple Terminal appears to be the entity that sets LC_CTYPE before launching the shell - however the CI system is not using the Apple Terminal.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I see two options:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
    (1) Either assume that macOS is UTF-8.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
    (2) We add a script to the provisioning of macOS to always set the LC_CTYPE environment variable to have the value UTF-8 (or any other environment variable that you'd like).</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Can you think of any other ways to resolve this?</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Simon</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Development <development-bounces@qt-project.org> on behalf of Thiago Macieira <thiago.macieira@intel.com><br>
<b>Sent:</b> Tuesday, April 28, 2020 17:42<br>
<b>To:</b> development@qt-project.org <development@qt-project.org><br>
<b>Subject:</b> Re: [Development] RFC: Defaulting to or enforcing UTF-8 locales on Unix systems</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Tuesday, 28 April 2020 07:20:33 PDT Thiago Macieira wrote:<br>
> On Monday, 27 April 2020 13:54:13 PDT Simon Hausmann wrote:<br>
> > I looked at the patch again and searched a bit around. I think nl_langinfo<br>
> > is “broken” on macOS but it doesn’t matter: everything seems to be utf-8,<br>
> > all system APIs expect it. I think the CI is well configured and the patch<br>
> > should treat Darwin like Android<br>
> <br>
> nl_langinfo is not broken on Mac. I tested it on 10.14 and 10.15 and it<br>
> works just fine. More importantly, setlocale() obeys the LC_ALL behaviour<br>
> to change the locale of the POSIX functions just fine.<br>
> <br>
> What I need is that the CI set LANG or LC_ALL to "UTF-8". Somehow, the CI<br>
> either unset that or was run from an environment that didn t have it set in<br>
> he first place.<br>
<br>
Another possibility is that some script overrode LC_ALL to "C" so as to get <br>
non-localised output. Please fix it to override to "C.UTF-8" or something that <br>
works on a Mac.<br>
<br>
-- <br>
Thiago Macieira - thiago.macieira (AT) intel.com<br>
  Software Architect - Intel System Software Products<br>
<br>
<br>
<br>
_______________________________________________<br>
Development mailing list<br>
Development@qt-project.org<br>
<a href="https://lists.qt-project.org/listinfo/development">https://lists.qt-project.org/listinfo/development</a><br>
</div>
</span></font></div>
</body>
</html>