coelacant1 / OpenDACT

Open Source Delta Automatic Calibration Tool
https://forum.seemecnc.com/forum/viewtopic.php?f=36&t=8698&sid=fee0abe0878b65d8c2f023d4b06b0775
GNU Affero General Public License v3.0
53 stars 21 forks source link

Doesn't work with Russian locale (with comma as decimal separator) #13

Open Bougakov opened 7 years ago

Bougakov commented 7 years ago

It appears that the program is having issues working in Windows with non-US locale set.

I have Windows 10 64bit with Russian locale; it uses comma, not point as a decimal delimiter. All the numbers that appear in the main window are displayed with a points before decimal parts.

But it seems that internally the program operates with correct localized functions - and crashes when it sees the "wrong" decimal delimiter.

image

If I create a temporary Windows account and set its locale to UK or US, program works.

Maybe the problem is that reading EEPROM always gives you the numbers with decimal point as separator. In US locale treating these strings as numbers just works, in Russian locale it doesn't.

Please check this for details: https://msdn.microsoft.com/en-us/library/system.globalization.numberformatinfo.numberdecimalseparator%28v=vs.110%29.aspx?f=255&MSPPError=-2147217396