mirror of https://github.com/apache/nifi.git
NIFI-8250 - This closes #4838. UTF8 encoding for FTP processors
Signed-off-by: Joe Witt <joewitt@apache.org>
This commit is contained in:
parent
3cb26aec72
commit
9101160cbf
|
@ -101,6 +101,7 @@ public class ListFTP extends ListFileTransfer {
|
|||
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;
|
||||
}
|
||||
|
||||
|
|
|
@ -603,6 +603,7 @@ public class FTPTransfer implements FileTransfer {
|
|||
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());
|
||||
|
|
Loading…
Reference in New Issue