Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Fixed a bug that prevented Yacy from indexing files with non ASCII filenames in FTP servers.

David Rubioc2341a175fdd
diff --git a/source/net/yacy/cora/protocol/ftp/FTPClient.java b/source/net/yacy/cora/protocol/ftp/FTPClient.java
index d7ff3d697..120982967 100644
--- a/source/net/yacy/cora/protocol/ftp/FTPClient.java
+++ b/source/net/yacy/cora/protocol/ftp/FTPClient.java
@@ -1969,7 +1969,8 @@ public class FTPClient {
// protocoll socket commands
private void send(final String buf) throws IOException {
- this.clientOutput.writeBytes(buf);
+ byte[] b = buf.getBytes("UTF-8");
+ this.clientOutput.write(b, 0, b.length);
this.clientOutput.write('\r');
this.clientOutput.write('\n');
this.clientOutput.flush();