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

elharo pushed a commit to branch agan
in repository https://gitbox.apache.org/repos/asf/maven-changes-plugin.git

commit 4233cd24a5858ab6054b6cddced604a58840482f
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Sat Nov 23 13:15:08 2024 -0500

    default
---
 .../org/apache/maven/plugins/announcement/AnnouncementMailMojo.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMailMojo.java 
b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMailMojo.java
index 639ef2a..21b15dc 100644
--- 
a/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMailMojo.java
+++ 
b/src/main/java/org/apache/maven/plugins/announcement/AnnouncementMailMojo.java
@@ -27,6 +27,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStreamReader;
 import java.io.UnsupportedEncodingException;
+import java.nio.charset.Charset;
 import java.util.List;
 
 import org.apache.maven.model.Developer;
@@ -338,7 +339,7 @@ public class AnnouncementMailMojo extends 
AbstractAnnouncementMojo {
     protected String readAnnouncement(File file) throws MojoExecutionException 
{
         try {
             if (templateEncoding == null || templateEncoding.isEmpty()) {
-                templateEncoding = System.getProperty("file.encoding");
+                templateEncoding = Charset.defaultCharset().displayName();
                 getLog().warn("File encoding has not been set, using platform 
encoding '" + templateEncoding
                         + "', i.e. build is platform dependent!");
             }

Reply via email to