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:
Benedikt Ritter 2014-07-15 18:02:02 +00:00
parent f4e1197bdc
commit ed65e66f69
1 changed files with 1 additions and 1 deletions

View File

@ -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) {