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

Thiago Macieira thiago.macieira at intel.com
Mon Nov 4 23:20:05 CET 2019


On Monday, 4 November 2019 11:50:01 PST André Pönitz wrote:
> On Mon, Nov 04, 2019 at 11:38:07AM -0800, Thiago Macieira wrote:
> > On Monday, 4 November 2019 11:18:12 PST André Pönitz wrote:
> > > A parser accepting the output of one might or might not be able to
> > > handle the second.
> > 
> > A driver would set LC_ALL in the environment when it calls gcc.
> 
> Can we please take a step back and repeat for the slow thinker^H^H me
> what the benefit of forcing a UTF-8 locale on unknown child processes
> would be?

Two-fold:

1) it forces the UTF-8 locale on the *current* process, in case some other 
part of the same process does setlocale(LC_ALL, "") after QCoreApplication

2) it forces the child process to use the same locale as the parent Qt 
application

Since Qt will force itself to UTF-8, then we want the Qt application to 
interpret
	"Arquivo ou diretório inexistente"
instead of
	"Arquivo ou diret�rio inexistente"

-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel System Software Products





More information about the Development mailing list