I am using the ftps camel component with camel version 2.22.0. The ftp server is on Linux.
https://camel.apache.org/components/latest/ftps-component.html
The filename has special characters which are being encoded using the java.net.URLEncoder to UTF-8. I am using the camelFileName header to encode the filename.
Special characters such as single quotes, double quotes, braces are being encoded, however when the filename has an UK pound sign £, the camel header camelFileName is populated with two special characters, £, both are being encoded. Can someone explain why this is?
Example:
Filename: testfile£.csv,
camelFileName header: testfile£.csv,
encoded filename: testfile%C3%82%C2%A3.csv
String fileName = (String) message.getHeader(CAMEL_FILENAME);
String encodedFileName = Utils.encodeValue(fileName);
private String encodeValue(String value) {
return URLEncoder.encode(value, StandardCharsets.UTF_8.toString());
}