File tree Expand file tree Collapse file tree
mailbox/api/src/main/java/org/apache/james/mailbox/model
protocols/imap/src/main/java/org/apache/james/imap/processor/fetch Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 */
2323package org .apache .james .mailbox .model ;
2424
25- import static java .nio .charset .StandardCharsets .US_ASCII ;
25+ import static java .nio .charset .StandardCharsets .UTF_8 ;
2626
2727import java .io .ByteArrayInputStream ;
2828import java .io .InputStream ;
@@ -75,12 +75,12 @@ public String toString() {
7575
7676 @ Override
7777 public InputStream getInputStream () {
78- return new ByteArrayInputStream ((name + ": " + value ).getBytes (US_ASCII ));
78+ return new ByteArrayInputStream ((name + ": " + value ).getBytes (UTF_8 ));
7979 }
8080
8181 @ Override
8282 public Publisher <ByteBuffer > reactiveBytes () {
83- return Flux .just ((name + ": " + value ).getBytes (US_ASCII ))
83+ return Flux .just ((name + ": " + value ).getBytes (UTF_8 ))
8484 .map (ByteBuffer ::wrap );
8585 }
8686}
Original file line number Diff line number Diff line change 1919package org .apache .james .imap .processor .fetch ;
2020
2121import static java .nio .charset .StandardCharsets .US_ASCII ;
22+ import static java .nio .charset .StandardCharsets .UTF_8 ;
2223import static org .apache .james .imap .api .ImapConstants .LINE_END_BYTES ;
2324
2425import java .io .ByteArrayInputStream ;
@@ -88,7 +89,7 @@ public InputStream getInputStream() throws IOException {
8889 for (Header header : headers ) {
8990 out .write (header .getName ().getBytes (US_ASCII ));
9091 out .write (NAME_DELIMITER_BYTES );
91- out .write (header .getValue ().getBytes (US_ASCII ));
92+ out .write (header .getValue ().getBytes (UTF_8 ));
9293 out .write (LINE_END_BYTES );
9394 }
9495 // no empty line with CRLF for MIME headers. See IMAP-297
You can’t perform that action at this time.
0 commit comments