Use StandardCharsets class in user guide code examples, since it is more save than passing a string
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/csv/trunk@1610786 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f4e1197bdc
commit
ed65e66f69
|
@ -40,7 +40,7 @@ for (CSVRecord record : records) {
|
|||
</p>
|
||||
<source>final URL url = ...;
|
||||
try (
|
||||
final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), "UTF-8");
|
||||
final Reader reader = new InputStreamReader(new BOMInputStream(url.openStream()), StandardCharsets.UTF_8);
|
||||
final CSVParser parser = new CSVParser(reader, CSVFormat.EXCEL.withHeader());
|
||||
) {
|
||||
for (final CSVRecord record : parser) {
|
||||
|
|
Loading…
Reference in New Issue