-
Notifications
You must be signed in to change notification settings - Fork 122
Open
Labels
Description
Seems like most instances of Unit::ParseString(const string& str, bool useDisplayLocale) are using the default, locale-aware behavior, and this has the potential to subtly break a lot of things.
Found this while testing csvstreamer, it wouldn't display any fractional values, but searching around most instruments which are using this are using the default value too.
This behavior is language dependent, if I run ngscopeclient with LANG=C ngscopeclient it works fine.
Broken behaviour (LANG=hu-HU.utf8 ngscopeclient):
Running with LANG=C:
Way to test it:
LANG=hu_HU.utf8 ngscopeclient
And the test input sequence:
CSV-NAME,CH1,CH2,CH3,CH4,CH5,CH6,CH7,CH8
CSV-CHANNELS,CH1,CH2,CH3,CH4,CH5,CH6,CH7,CH8
CSV-UNITS,V,V,V,V,V,V,V,V
CSV-DATA,1.2,-2,3,4,5,6,-7,8.4
CSV-DATA,1.2,-2,3,4,5,6,-7,8.4
CSV-DATA,1.2,-2,3,4,5,6,-7,8.4
CSV-DATA,1.2,-2,3,4,5,6,-7,8.4
CSV-DATA,1.2,-2,3,4,5,6,-7,8.4