Skip to content

Commit

Permalink
Merge pull request #73 from assimbly/72-encoder-unexpected-output
Browse files Browse the repository at this point in the history
Encoder - first conversion should be originCharset, and not UTF-8
  • Loading branch information
skin27 authored Dec 20, 2023
2 parents 2142ba8 + faaf262 commit 1b8ab95
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ public void process(Exchange exchange) throws Exception {

byte[] bytes = exchange.getIn().getBody(byte[].class);

String original = new String(bytes, StandardCharsets.UTF_8);
String result = new String(original.getBytes(config.getOriginCharset()), config.getTargetCharset());
String original = new String(bytes, config.getOriginCharset());
String result = new String(original.getBytes(), config.getTargetCharset());

exchange.getIn().setBody(result);

Expand Down

0 comments on commit 1b8ab95

Please sign in to comment.