Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force decimal separator '.'? #442

Open
randfee opened this issue Apr 25, 2024 · 2 comments
Open

force decimal separator '.'? #442

randfee opened this issue Apr 25, 2024 · 2 comments

Comments

@randfee
Copy link

randfee commented Apr 25, 2024

Hi,

I would appreciate an option to force '.' as decimal separator.
I tried to set settings/mainwindow/locale, which was described here:
.. but that didn't work. The field appears empty with no list to choose from and no ability to input something.
When I start and start adding the three axes points I see that it states 'Germany' but that also can't be changed.

Therefore my recommendation would be to simply offer an option to force '.' as decimal separator somewhere (maybe the export format window OR a simple addition to the "edit axis point" window?

2024-04-25 09_57_25-Window
2024-04-25 09_56_03-Window

@aa956
Copy link

aa956 commented Jun 17, 2024

Same problem with locale having ',' as a decimal separator:
image

One more note: CSV is exported broken as both decimal and list separators used are , (comma), although as far as I know list separator for et-EE locale should be ; (semicolon).

So CSV export results are unusable without extensive postprocessing (as just a subset of the numeric values are in quotes):

x,curve,curve-1
"1,01099","99,553","99,105"
"1,27795","99,532","99,1"
"1,6169","99,554","99,089"
"3,0781","99,514","99,035"
4127,"83,818","82,533"
"5022,7","81,882","82,537"

As a work-around TSV export that is run through sed replacing first , with . and then \t with , yields usable result without too much work to parse the CSV export results.

@aa956
Copy link

aa956 commented Jun 19, 2024

One more problem probably with the same cause: broken localization.

Export of negative numbers to TSV results in "?" instead of "-" prefix for a number (sample data with x starting at -180):

x	Sample1	Sample2
?180,093	44,266	32,049
?180,061	44,267	32,049
?165,112	44,568	32,049

So at the moment workaround to prepare CSV from TSV looks like:

  • replace "?" with "-"
  • replace "," with "."
  • replace "\t" with ","

For example:

sed -e 's/\?/\-/g' -e 's/\,/\./g' -e 's/\t/\,/g' data.tsv > data.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants