You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @stfour, interesting...! Thanks for posting this.
Could you clarify exactly the difference between Italian and US? I thought CSV was just a standard - I mean, you can choose different delimiters but I wasn't aware that was language/country specific.
I wonder if perhaps another approach to solve this would be to add a setting to the Export Manager UI named "Delimiter", and then have everything automatically work based off that?
The problem is the decimal separator. Any country that uses comma ',' as decimal separator (instead of poin '.') will use semicolon ';' in CSV. This is default behaviour of Excel and most of apps that uses Window's default regional settings.
As far I know the only standard CSV is comma for column and point as decimal. So, yes, programs that uses semicolon and comma for numbers in CSV are wrong. But in real world, the standard is how Excel open the files.
Activity
stfour commentedon Feb 20, 2019
The above code is for US CSV, for IT I need
$needQuote = (strstr($value, ";") || strstr($value, "\n"));so ';' instead of ','... I think we can safely use the following for both:
$needQuote = (strstr($value, ";") || strstr($value, ",") || strstr($value, "\n"));Ciao
Marco (stfour)
benkeen commentedon Feb 21, 2019
Hey @stfour, interesting...! Thanks for posting this.
Could you clarify exactly the difference between Italian and US? I thought CSV was just a standard - I mean, you can choose different delimiters but I wasn't aware that was language/country specific.
I wonder if perhaps another approach to solve this would be to add a setting to the Export Manager UI named "Delimiter", and then have everything automatically work based off that?
stfour commentedon Feb 21, 2019
The problem is the decimal separator. Any country that uses comma ',' as decimal separator (instead of poin '.') will use semicolon ';' in CSV. This is default behaviour of Excel and most of apps that uses Window's default regional settings.
As you can see we are not alone:
https://en.wikipedia.org/wiki/Decimal_separator
As far I know the only standard CSV is comma for column and point as decimal. So, yes, programs that uses semicolon and comma for numbers in CSV are wrong. But in real world, the standard is how Excel open the files.
Ciao
Marco