You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by eb...@apache.org on 2020/04/07 10:49:10 UTC

[tomcat-jakartaee-migration] branch master updated: Really use the charset parameter in the Util.toString(InputStream, Charset) method

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

ebourg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git


The following commit(s) were added to refs/heads/master by this push:
     new d3c805d  Really use the charset parameter in the Util.toString(InputStream, Charset) method
d3c805d is described below

commit d3c805df5d38e60420f7b51b1f02d1de53cf2d94
Author: Emmanuel Bourg <eb...@apache.org>
AuthorDate: Tue Apr 7 12:48:39 2020 +0200

    Really use the charset parameter in the Util.toString(InputStream, Charset) method
---
 src/main/java/org/apache/tomcat/jakartaee/Util.java | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/tomcat/jakartaee/Util.java b/src/main/java/org/apache/tomcat/jakartaee/Util.java
index 7189d8a..1fbca92 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Util.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Util.java
@@ -21,7 +21,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.nio.charset.Charset;
-import java.nio.charset.StandardCharsets;
 import java.util.Locale;
 
 public class Util {
@@ -54,7 +53,7 @@ public class Util {
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
         Util.copy(is, baos);
 
-        return new String(baos.toByteArray(), StandardCharsets.ISO_8859_1);
+        return new String(baos.toByteArray(), charset);
     }
 
     private Util() {


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org