RED-4543 - In fileAttributesController, support ASCII and ISO as Encoding Type
- use private method create to parse encoding
This commit is contained in:
parent
5c6cf4c728
commit
faa1037bea
@ -147,7 +147,7 @@ public class FileAttributesController implements FileAttributesResource {
|
||||
|
||||
List<List<String>> records = new ArrayList<>();
|
||||
|
||||
try (CSVReader csvReader = new CSVReaderBuilder(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(csv), StandardCharsets.UTF_8))).withCSVParser(parser)
|
||||
try (CSVReader csvReader = new CSVReaderBuilder(new BufferedReader(new InputStreamReader(new ByteArrayInputStream(csv), parseEncoding(encoding)))).withCSVParser(parser)
|
||||
.build()) {
|
||||
records.addAll(csvReader.readAll().stream().map(Lists::newArrayList).collect(Collectors.toList()));
|
||||
} catch (IOException | CsvException e) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user