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

CSV Export problem with export-data.js in Firefox #7448

Closed
JohnPortella opened this Issue Nov 23, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@JohnPortella

JohnPortella commented Nov 23, 2017

Hi,
Recently I realized that when downloading in CSV format, both the column separator and the decimal is the comma. This causes more columns to exist than they should.

Expected behaviour

"Category","Cities","Universities"
0,29.9,17.5
1,71.5,1.5
2,106.4,16.4

Actual behaviour

"Category","Cities","Universities"
0,29,9,17,5
1,71,5,1,5
2,106,4,16,4

Live demo with steps to reproduce

http://jsfiddle.net/qSfJw/6/

Affected browser(s)

Firefox v56

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Nov 23, 2017

Contributor

Hi @JohnPortella

Thank you for reporting the issue. Tested with:

  • Firefox 56.0 (osx) -> buggy
  • Firefox 56.0.1 (windows) -> works fine
  • Firefox 57.0 (osx) -> works fine
  • Firefox 57.0 (windows) -> works fine

Digging more, it's not related to the browser/system but to the browser's language localisation. In short, let's compare:

  • (1.1).toLocaleString()
  • (1.1).toString()

EN based browsers we get ., PL returns all decimal separators as ,. Actually, , is the correct one for PL (spreadsheets apps will interpret those as numbers).

I think we should set exporting.csv.itemDelimiter to ;.

@TorsteinHonsi

Contributor

pawelfus commented Nov 23, 2017

Hi @JohnPortella

Thank you for reporting the issue. Tested with:

  • Firefox 56.0 (osx) -> buggy
  • Firefox 56.0.1 (windows) -> works fine
  • Firefox 57.0 (osx) -> works fine
  • Firefox 57.0 (windows) -> works fine

Digging more, it's not related to the browser/system but to the browser's language localisation. In short, let's compare:

  • (1.1).toLocaleString()
  • (1.1).toString()

EN based browsers we get ., PL returns all decimal separators as ,. Actually, , is the correct one for PL (spreadsheets apps will interpret those as numbers).

I think we should set exporting.csv.itemDelimiter to ;.

@TorsteinHonsi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment