arohl / gdis

A visualization program for the display, manipulation, and analysis of isolated molecules and periodic structures
GNU General Public License v2.0
43 stars 17 forks source link

fix _BUG_ when launching uspex with a foreign local. #26

Closed ovhpa closed 5 years ago

ovhpa commented 5 years ago

This fixes a problem when launching GDIS from a computer with a LANG and/or LC_ALL global variable set as other than C. In some language, specific format for numbers causes GDIS to parse input files incorrectly.

For example, in French, a decimal number is defined by digits separated by a coma. This result in the following incorrect display: lang_fr note the comma for numbers as well as truncation to zero (Energy is -73,000000 eV). Also the structure is not loaded properly and have a wrong number of atoms. For information, this is the proper display: lang_c

The BUG is fixed by setting the local globally to "C", which should be cross-platform. In the future, however, we should save the original locale in order to have proper translations for GDIS.