|
|
Am 01.08.2018 um 10:33 schrieb clipka:
> @dick: Are you actively changing the C/C++ locale in qtpovray, or do you
> happen to know whether Qt does so by default? (buzzword `setlocale`)
Never mind that question. According to StackOverflow, QCoreApplication
(on Unix/Linux) does indeed invoke
setlocale(LC_ALL,"")
which screws up things. The suggested solution is to invoke
setlocale(LC_ALL,"C")
right after initialization of QCoreApplication or QApplication. See here:
https://stackoverflow.com/questions/25661295/why-does-qcoreapplication-call-setlocalelc-all-by-default-on-unix-linux
Unfortunately there is no portable way to fix this in POV-Ray itself,
short of completely re-writing all code that currently depends on the
C/C++ locale setting. At the moment, there is probably a host of such
locale-dependent sections in the POV-Ray source code, only very few of
which have already been identified as such.
The C and C++ standards guarantee that at program startup the locale is
set to the "C" locale, and all locale-dependent code in POV-Ray relies
on this remaining unchanged.
Post a reply to this message
|
|