You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/08/12 14:38:21 UTC

[GitHub] [metron] mmiklavc commented on a change in pull request #1341: METRON-614: Eliminate use of the default Charset

mmiklavc commented on a change in pull request #1341: METRON-614: Eliminate use of the default Charset
URL: https://github.com/apache/metron/pull/1341#discussion_r312958881
 
 

 ##########
 File path: metron-platform/metron-parsing/metron-parsers-common/src/main/java/org/apache/metron/parsers/interfaces/MessageParser.java
 ##########
 @@ -81,4 +81,11 @@
    */
   boolean validate(T message);
 
+  /**
+   * Provides a hook to override the default charset parsers use to read data.
+   * @return Charset to use for for reading
+   */
+  default Charset getReadCharset() {
+    return StandardCharsets.UTF_8;
 
 Review comment:
   I made a compromise on not handling this also with a global option. As we had talked above about needing to change read charsets likely being an edge case, it seemed reasonable to add the capability to the parsers individually.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services