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

Already on GitHub? Sign in to your account

Fix splitLineCSV and broken CSV export in non US culture #49

Merged
merged 1 commit into from Dec 13, 2016
Jump to file or symbol
Failed to load files and symbols.
+3 −3
Split
@@ -80,7 +80,7 @@ public class OutputFile_rawtxt {
int nVal = values.length;
for (int Ival = 0; Ival < nVal; Ival++) {
output.print(", ");
- output.print(String.format("%.2f", scale_fac * float(values[Ival])));
+ output.print(String.format(Locale.US, "%.2f", scale_fac * float(values[Ival])));
}
}
@@ -139,11 +139,11 @@ class Table_CSV extends Table {
setRowCount(row << 1);
}
if (row == 0 && header) {
- setColumnTitles(tsv ? PApplet.split(line, '\t') : splitLineCSV(line));
+ setColumnTitles(tsv ? PApplet.split(line, '\t') : splitLineCSV(line, reader));
header = false;
}
else {
- setRow(row, tsv ? PApplet.split(line, '\t') : splitLineCSV(line));
+ setRow(row, tsv ? PApplet.split(line, '\t') : splitLineCSV(line, reader));
row++;
}