Skip to content

Commit

Permalink
NIFI-8250 - This closes apache#4838. UTF8 encoding for FTP processors
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Witt <[email protected]>
  • Loading branch information
pvillard31 authored and joewitt committed Feb 23, 2021
1 parent 3cb26ae commit 9101160
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ protected List<PropertyDescriptor> getSupportedPropertyDescriptors() {
properties.add(ListedEntityTracker.TRACKING_STATE_CACHE);
properties.add(ListedEntityTracker.TRACKING_TIME_WINDOW);
properties.add(ListedEntityTracker.INITIAL_LISTING_TARGET);
properties.add(FTPTransfer.UTF8_ENCODING);
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,7 @@ private FTPClient getClient(final FlowFile flowFile) throws IOException {
final boolean useUtf8Encoding = ctx.getProperty(UTF8_ENCODING).isSet() ? ctx.getProperty(UTF8_ENCODING).asBoolean() : false;
if (useUtf8Encoding) {
client.setControlEncoding("UTF-8");
client.setAutodetectUTF8(useUtf8Encoding);
}

client.connect(inetAddress, ctx.getProperty(PORT).evaluateAttributeExpressions(flowFile).asInteger());
Expand Down

0 comments on commit 9101160

Please sign in to comment.