You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2019/01/08 17:49:30 UTC

[GitHub] SavtechSolutions commented on a change in pull request #3250: NIFI-5937 use processor-configured encoding instead of the system default

SavtechSolutions commented on a change in pull request #3250: NIFI-5937 use processor-configured encoding instead of the system default
URL: https://github.com/apache/nifi/pull/3250#discussion_r246091455
 
 

 ##########
 File path: nifi-nar-bundles/nifi-elasticsearch-bundle/nifi-elasticsearch-processors/src/main/java/org/apache/nifi/processors/elasticsearch/PutElasticsearchHttpRecord.java
 ##########
 @@ -345,7 +348,7 @@ public void onTrigger(final ProcessContext context, final ProcessSession session
                 writeRecord(record, record.getSchema(), generator);
                 generator.flush();
                 generator.close();
-                json.append(out.toString());
+                json.append(out.toString(charset.name()));
 
 Review comment:
   This was my initial intention, but now I'm on the fence about that one. What if textual data in the record is encoded with something other than UTF-8 (assuming this is even possible)?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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