I am testing Ant on a BS2000 - Siemens EBCDIC mainframe -
and have arranged the file:
jakarta-ant/src/main/org/apache/tools/ant/SunParser.java
to allow the build.xml file to be in the machine encoding.
As build.xml is source file it had to be in the native encoding!

Here after are the needed changes:

--- jakarta-ant/src/main/org/apache/tools/ant/SunParser.java    Thu Mar 30
16:44:04 2000
+++ jakarta-ant/src/main/org/apache/tools/ant/SunParser.java    Thu Mar 30
12:08:07 2000
@@ -55,6 +55,8 @@
 package org.apache.tools.ant;
 
 import java.io.File;
+import java.io.InputStreamReader;
+import java.io.FileInputStream;
 import java.io.IOException;
 import com.sun.xml.parser.Resolver;
 import com.sun.xml.tree.XmlDocument;
@@ -73,7 +75,9 @@
      */
     public Document parse(File buildFile)
     throws SAXException, IOException {
-           InputSource input = Resolver.createInputSource(buildFile);
+           // InputSource input = Resolver.createInputSource(buildFile);
+           // xml = source use native encoding.
+            InputSource input = new InputSource( new InputStreamReader(new
FileInputStream(buildFile)));
            return XmlDocument.createXmlDocument(input, false);
     }
 }


 <<SunParser.ant.txt>> 
Jean-Fr�d�ric Cl�re
EP LP DC22 (BCN)
Fujitsu Siemens Computers
Phone + 34 93 480 4209
Fax     + 34 93 480 4201
Mail mailto:[EMAIL PROTECTED]

--- cvs/jakarta-ant/src/main/org/apache/tools/ant/SunParser.java        Thu Mar 
30 16:44:04 2000
+++ jakarta-ant/src/main/org/apache/tools/ant/SunParser.java    Thu Mar 30 
12:08:07 2000
@@ -55,6 +55,8 @@
 package org.apache.tools.ant;
 
 import java.io.File;
+import java.io.InputStreamReader;
+import java.io.FileInputStream;
 import java.io.IOException;
 import com.sun.xml.parser.Resolver;
 import com.sun.xml.tree.XmlDocument;
@@ -73,7 +75,9 @@
      */
     public Document parse(File buildFile)
     throws SAXException, IOException {
-           InputSource input = Resolver.createInputSource(buildFile);
+           // InputSource input = Resolver.createInputSource(buildFile);
+           // xml = source use native encoding.
+            InputSource input = new InputSource( new InputStreamReader(new 
FileInputStream(buildFile)));
            return XmlDocument.createXmlDocument(input, false);
     }
 }

Reply via email to