Problem 1487

Summary: LC_NUMERIC confuses strtod when Qt is being used
Product: Geant4 Reporter: Mojca Miklavec <mojca.miklavec.lists>
Component: visualizationAssignee: garnier
Status: RESOLVED FIXED    
Severity: trivial    
Priority: P5    
Version: 9.6   
Hardware: All   
OS: All   
Attachments: A patch to set LC_NUMERIC to C to prevent number parsers expecting a comma

Description Mojca Miklavec 2013-07-09 12:06:43 CEST
Created attachment 223 [details]
A patch to set LC_NUMERIC to C to prevent number parsers expecting a comma

I'm submitting a patch written by Jérôme Suhard (I only fixed the URL and uploaded the patch), see http://suhard.fr/gate/ & http://suhard.fr/gate/patches/geant4-string-to-double.patch.

See also my initial report:
http://hypernews.slac.stanford.edu/HyperNews/geant4/get/userinterface/84.html?inline=-1
Comment 1 Mojca Miklavec 2013-07-09 13:44:51 CEST
And while at it: maybe one could also translate or remove the comment "Si j'ai bien compris, cette fonction ne sert à rien" from the same file (source/interfaces/common/src/G4Qt.cc), or at least convert it to UTF-8. My editor keeps complaining about the encoding which is pretty annoying.

Also, please change this in all of the supported Geant4 versions - at least in 9.6 and 10.0 if possible. (I'm not sure if Geant4 9.5 is still supported - that one requires an offset of one.)
Comment 2 perl 2013-07-09 18:08:48 CEST
Thank you Mojca.
The issue will need to be looked at by our Qt expert, Laurent Garnier.
FYI, he is currently on holiday, so I would not expect a response for a few weeks.
Comment 3 Mojca Miklavec 2013-07-10 20:55:24 CEST
Thank you. No problem, I can wait.
Comment 4 garnier 2013-11-25 00:04:57 CET
Fixed