You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2023/12/15 20:56:40 UTC

(commons-email) branch master updated: Test with UTF-8

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-email.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a4afc1  Test with UTF-8
0a4afc1 is described below

commit 0a4afc158981ac4a1bbc0f737bb92558948e5fc5
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Fri Dec 15 15:56:36 2023 -0500

    Test with UTF-8
---
 src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java b/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
index a28c77b..65e0156 100644
--- a/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
+++ b/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
@@ -34,6 +34,7 @@ import java.io.File;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.URL;
+import java.nio.charset.StandardCharsets;
 import java.util.List;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -72,7 +73,7 @@ public class ImageHtmlEmailTest extends HtmlEmailTest {
         try (final InputStream stream = url.openStream()) {
             final StringBuilder html = new StringBuilder();
             try {
-                final List<String> lines = IOUtils.readLines(stream);
+                final List<String> lines = IOUtils.readLines(stream, StandardCharsets.UTF_8);
                 for (final String line : lines) {
                     html.append(line).append("\n");
                 }