rpamu-jdev opened a new pull request, #24000:
URL: https://github.com/apache/camel/pull/24000

   ## Summary
   
   - Adds a new `charsetUnmappable` endpoint option with values `REPORT` 
(default), `IGNORE`, and `REPLACE`
   - `REPORT` preserves existing behavior (throws 
`UnmappableCharacterException`)
   - `IGNORE` silently drops unmappable/malformed characters
   - `REPLACE` substitutes them with the charset replacement character
   
   ## Changes
   
   - `IOHelper` - new `toCodingErrorAction()` helper and overloads for 
`toReader`/`toInputStream`/`EncodingInputStream` accepting `CodingErrorAction`
   - `GenericFileEndpoint` - new `@UriParam` option `charsetUnmappable`
   - `GenericFile` - carries `charsetUnmappable` alongside `charset`
   - `FileConsumer` - propagates setting when constructing `GenericFile`
   - `GenericFileConverter` - applies `CodingErrorAction` when reading
   - `FileOperations` - applies `CodingErrorAction` when writing
   
   ## Usage
   
   \`\`\`java
   from("file:inbox?charset=ISO-8859-1&charsetUnmappable=IGNORE")
   
from("file:inbox?charset=UTF-8").to("file:outbox?charset=ISO-8859-1&charsetUnmappable=REPLACE");
   \`\`\`
   
   Fixes: https://issues.apache.org/jira/browse/CAMEL-18685


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to