Menu

#6 Issue entering analog values on US systems

open-fixed
nobody
None
5
2012-05-28
2012-02-09
No

When entering values in an 'AnalogIn ' input component, there is an assumption that emulare is running on
a system with a decimal symbol of ',' (a comma). The software will convert periods into commas prior
to parsing the entered input value using system native routines. This will cause the parsing of value with a
decimal separator on all systems other than those configured for regions that use commas as the decimal
separator.

The problematic code is at line 30 in [src]\Components\BasicComponents\Display\AnalogInDialog.cs:

int i = input.IndexOf('.');

if (i != -1)
input = input.Substring(0, i) + ',' + input.Substring(i + 1);

All three of these lines should be removed.

I have attached an updated version of AnalogInDialog.cs. I will try to provide built binaries later.

Discussion

  • Steve Morlock

    Steve Morlock - 2012-02-09
     
  • Imre Leber

    Imre Leber - 2012-05-27

    You are right, the program should really execute in the users locale.

     
  • Imre Leber

    Imre Leber - 2012-05-28
    • status: open --> open-fixed
     
  • Imre Leber

    Imre Leber - 2012-05-28

    fixed in 1.9

     

Log in to post a comment.