nywitness commented on a change in pull request #60:
URL: https://github.com/apache/maven-shared-utils/pull/60#discussion_r462750423
##########
File path:
src/test/java/org/apache/maven/shared/utils/cli/CommandLineUtilsTest.java
##########
@@ -168,4 +169,25 @@ private void assertCmdLineArgs( final String[] expected,
final String cmdLine )
assertEquals( expected.length, actual.length );
assertEquals( Arrays.asList( expected ), Arrays.asList( actual ) );
}
+
+ @Test
+ public void testChineseEncodingIssue()
Review comment:
> Write a simple Java program, put it in src/test/java, call the .class
file with Java from within the test. It should use System.out as a
byte-oriented stream which will write bytes according to GBK. Read those with
the consumer and check when normalized back to UTF-16.
I tried producing gbk bytes with `System.out.println(new
String("金色传说".getBytes(), "GBK")`. When comparing value in the cousumer, test
passes on a windows-gbk platform but fails on a mac-utf-8 platform. Maybe it's
not right to produce gbk bytes like that.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]