mirror of
https://github.com/frosch95/SmartCSV.fx.git
synced 2026-04-11 13:38:23 +02:00
Add the setting changes encoding for CSV file to the preference dialog
(cherry picked from commit 11210b6d8b4584621ef02e7356854ffa9f7f2647)
This commit is contained in:
@@ -34,6 +34,7 @@ import org.supercsv.io.ICsvMapReader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
@@ -48,7 +49,8 @@ public class CSVFileReader extends CSVConfigurable implements FileReader<CSVMode
|
||||
|
||||
ICsvMapReader mapReader = null;
|
||||
try {
|
||||
mapReader = new CsvMapReader(new java.io.FileReader(file.getAbsoluteFile()), csvPreference);
|
||||
mapReader = new CsvMapReader(new java.io.FileReader(file.getAbsoluteFile(), Charset.forName(fileEncoding)),
|
||||
csvPreference);
|
||||
model = new CSVModel();
|
||||
|
||||
// the header columns are used as the keys to the Map
|
||||
|
||||
Reference in New Issue
Block a user