justinleet 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_r312475214
 
 

 ##########
 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:
   Should this potentially be a global configuration that defaults to `UTF_8`?, 
which is then overridden by parser specific charset?
   
   I.e. if a user has all (or almost all) of their parsers in another charset, 
right now they'd have to set it for each and every parser. I'm not sure if this 
an actual or theoretical issue to be honest.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to