You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2017/12/20 09:27:46 UTC
[maven-ant-plugin] 37/48: encoding-it should not fail if platform
encoding does not support tested characters
This is an automated email from the ASF dual-hosted git repository.
hboutemy pushed a commit to annotated tag maven-ant-plugin-2.1
in repository https://gitbox.apache.org/repos/asf/maven-ant-plugin.git
commit 31cbe99277fe8e04bcdcb9a9c7e97d151b7329ab
Author: Herve Boutemy <hb...@apache.org>
AuthorDate: Thu Apr 3 21:55:21 2008 +0000
encoding-it should not fail if platform encoding does not support tested characters
git-svn-id: https://svn.apache.org/repos/asf/maven/plugins/trunk/maven-ant-plugin@644526 13f79535-47bb-0310-9956-ffa450edef68
---
src/it/encoding-it/verify.bsh | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/it/encoding-it/verify.bsh b/src/it/encoding-it/verify.bsh
index d4f9d86..a12e1f0 100644
--- a/src/it/encoding-it/verify.bsh
+++ b/src/it/encoding-it/verify.bsh
@@ -13,7 +13,19 @@ try
if ( file.getName().indexOf( '?' ) >= 0 )
{
System.err.println( "JAR file name contains corrupted characters: " + file );
- return false;
+ System.err.println( "Platform encoding: " + System.getProperty( "file.encoding" ) );
+ String expected = "\u00E4\u00F6\u00FC\u00DF";
+ System.err.println( "expected string with this platform encoding:" + expected );
+ String result = new String( expected.getBytes() );
+ if ( expected.equals( result ) )
+ {
+ System.err.println( "Platform encoding supports these characters, filename should not be corrupted." );
+ return false;
+ }
+ else
+ {
+ System.err.println( "WARN: Platform encoding does not support these characters: filename is corrupted, but cannot determine if it's plugins' fault or not." );
+ }
}
return true;
}
--
To stop receiving notification emails like this one, please contact
"commits@maven.apache.org" <co...@maven.apache.org>.