garydgregory commented on code in PR #502:
URL: https://github.com/apache/commons-csv/pull/502#discussion_r1849059064
##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -164,7 +165,7 @@ protected Builder() {
@SuppressWarnings("resource")
@Override
public CSVParser get() throws IOException {
- return new CSVParser(getReader(), format != null ? format :
CSVFormat.DEFAULT, characterOffset, recordNumber);
+ return new CSVParser(getReader(), format != null ? format :
CSVFormat.DEFAULT, characterOffset, recordNumber, charset);
Review Comment:
Call getCharset()
##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -153,6 +153,7 @@ public static class Builder extends
AbstractStreamBuilder<CSVParser, Builder> {
private CSVFormat format;
private long characterOffset;
private long recordNumber = 1;
+ private Charset charset;
Review Comment:
You don't need this, it's already in the superclass.
##########
src/main/java/org/apache/commons/csv/CSVParser.java:
##########
@@ -200,6 +201,16 @@ public Builder setRecordNumber(final long recordNumber) {
return asThis();
}
+ /**
+ * Sets the character encoding to be used for the reader.
+ *
+ * @param charset the character encoding.
+ * @return this instance.
+ */
+ public Builder setCharset(final Charset charset) {
Review Comment:
You don't need this, see above.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]