[Development] RFC: Defaulting to or enforcing UTF-8 locales on Unix systems
apoenitz at t-online.de
Thu Nov 14 22:27:23 CET 2019
On Thu, Nov 14, 2019 at 12:10:24PM +0100, Mathias Hasselmann wrote:
> Am 03.11.2019 um 06:35 schrieb André Pönitz:
> > I am all for not propagating Qt's UTF-8 choice to child processes at all.
> "Write once, compile/run everywhere" mandates Qt enforcing a maximum level
> of homogenity within our Qt applications.
*Within* a Qt application consisting of Qt library, other libraries,
and actual user code it's mildly presumptous for one library to impose
random unnecessay restrictions on user code and other libraries.
I am running firefox in parallel, currently with 174 shared object
loaded. I don't think it will improve overall firefox user experience
if the authors of said 174 library decide to impose their views on what
is good code and what is bad code on the other 173 participants in
And even if people agreed on using UTF-8 inside an application - and I
wouldn't disagree - this does not warrant changing the environment.
> That extends to the input and output streams of the child processes
> our applications deal with.
Making assumptions on the controlability of content of a input stream is
questionable. The proposed method of changing the environment for child
processes is no guarantee on what the child actually produces, and the
Qt application still has to be prepared to handle non-Utf-8 or otherwise
So this is effectively snake oil.
> Not propagating Qt's UTF-8 choices seeems like a violation of that
> principle of maximum homogenity.
Which you just invented.
Apart from that we just broke "homogenity", as now child processes
started from a Qt application behave differently then when started
otherwise (see the gcc quotes example with different results on pure
> Hiding the complexity of obscure locale settings truely
> belongs to the hearth of Qt's obligations in my opinion.
This discussion so far claimed the existance of a range of problems
without giving an actual example. Then it goes on to propose a shotgut
approach (LC_ALL, "ALL") to handle ... what? "Obscure locale settings"
like categories that are a bit more fine grained than LC_ALL? Bear with
me when I do not have the impression that Qt will be the right context
to accept such "obligations".
PS: Just seen: https://wiki.debian.org/Locale:
Using LC_ALL is strongly discouraged as it overrides everything.
Please use it only when testing and never set it in a startup file.
More information about the Development