You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by greghogan <gi...@git.apache.org> on 2016/07/18 12:16:05 UTC

[GitHub] flink pull request #2060: [FLINK-3921] StringParser encoding

Github user greghogan commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2060#discussion_r71137136
  
    --- Diff: flink-core/src/main/java/org/apache/flink/api/common/io/GenericCsvInputFormat.java ---
    @@ -106,6 +106,11 @@ protected GenericCsvInputFormat() {
     	protected GenericCsvInputFormat(Path filePath) {
     		super(filePath);
     	}
    +
    +	protected GenericCsvInputFormat(Path filePath, Charset charset) {
    +		super(filePath);
    +		this.charset = charset != null ? charset : Charset.forName("UTF-8");
    --- End diff --
    
    Would this be better as `this.charset = Preconditions.checkNotNull(charset);` since the user should use `GenericCsvInputFormat(Path)` when using the default charset?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---