You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2005/03/09 14:56:29 UTC

DO NOT REPLY [Bug 33928] New: - Output of "java" task and left quote

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33928>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33928

           Summary: Output of "java" task and left quote
           Product: Ant
           Version: 1.6.2
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core tasks
        AssignedTo: dev@ant.apache.org
        ReportedBy: abashev@gmail.com


Essence of this bug lie in unusual the java task's output processing.
How reproduce it:
1. This is simple class which dump on the screen string "{220} {221}Click
{222}`Yes'{223}" in UTF-8 encoding. 

import java.io.*;

public class Main {
	public static void main(String[] args) throws Exception {
		byte[] b = new byte[] {123, 50, 50, 48, 125, 32, 123, 50, 50, 49, 125, 67,
108, 105, 99, 107, 32, 123, 50, 50, 50, 125, -30, -128, -104, 89, 101, 115, -30,
-128, -103, 123, 50, 50, 51, 125, 46};

        System.out.write(b);
        System.out.println();
	}
}

And then you ran this class from command line no unusual happens.
%java_home%\bin\java -cp . Main > text_file

2. But then we trying to do the same from ant build file like this:
<target name="test">
  <java classname="Main" output="other_text">
    <classpath>
      <pathelement location="."/>
    </classpath>
  </java>
</target>

other_text file is differ from text_file. And difference in left quote.

JDK 1.4.2_07

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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