You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2023/01/31 12:37:52 UTC

[commons-fileupload] branch master updated: Avoid file encoding issues in tests. Use \unnnn encoding

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 4c225a6  Avoid file encoding issues in tests. Use \unnnn encoding
4c225a6 is described below

commit 4c225a63fb20b99cd6af5cd08b0b99238d3f2cbf
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 31 12:36:29 2023 +0000

    Avoid file encoding issues in tests. Use \unnnn encoding
---
 .../org/apache/commons/fileupload2/util/mime/MimeUtilityTestCase.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/test/java/org/apache/commons/fileupload2/util/mime/MimeUtilityTestCase.java b/src/test/java/org/apache/commons/fileupload2/util/mime/MimeUtilityTestCase.java
index f4ae68d..8043c86 100644
--- a/src/test/java/org/apache/commons/fileupload2/util/mime/MimeUtilityTestCase.java
+++ b/src/test/java/org/apache/commons/fileupload2/util/mime/MimeUtilityTestCase.java
@@ -38,12 +38,12 @@ public final class MimeUtilityTestCase {
 
     @Test
     public void decodeUtf8QuotedPrintableEncoded() throws Exception {
-        assertEncoded(" h�! ���u !!!", "=?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=");
+        assertEncoded(" h\u00e9! \u00e0\u00e8\u00f4u !!!", "=?UTF-8?Q?_h=C3=A9!_=C3=A0=C3=A8=C3=B4u_!!!?=");
     }
 
     @Test
     public void decodeUtf8Base64Encoded() throws Exception {
-        assertEncoded(" h�! ���u !!!", "=?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=");
+        assertEncoded(" h\u00e9! \u00e0\u00e8\u00f4u !!!", "=?UTF-8?B?IGjDqSEgw6DDqMO0dSAhISE=?=");
     }
 
     @Test