Return-Path: Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 68409 invoked from network); 2 Sep 2000 00:57:45 -0000 Received: from ringo.kinzan.com (216.200.7.85) by locus.apache.org with SMTP; 2 Sep 2000 00:57:45 -0000 Received: by ringo.kinzan.com with Internet Mail Service (5.5.2650.21) id ; Fri, 1 Sep 2000 17:57:20 -0700 Message-ID: <89CEE7910009D411A05400D0B71C4DE77CEDD4@ringo.kinzan.com> From: Eric VanLydegraf To: "'ant-dev@jakarta.apache.org'" Subject: RE: [PATCH] add -encoding option support for Javac task Date: Fri, 1 Sep 2000 17:57:19 -0700 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C01478.BEEE6760" X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C01478.BEEE6760 Content-Type: text/plain; charset="ISO-2022-JP" Here's a patch for 1.35 Javac The original I think was based on older javac.java -----Original Message----- From: Hiroaki Nakamura [mailto:hnakamur@mc.neweb.ne.jp] Sent: Wednesday, August 30, 2000 10:29 AM To: ant-dev@jakarta.apache.org Subject: [PATCH] add -encoding option support for Javac task Hi, this is my first post to ant-dev. Attached is a patch for adding -encoding option support for Javac task. This change is needed when you compile a Java source file whose encoding is different from the OS native encoding, for example, the file encoding is SJIS and the OS encoding is EUCJIS. This is a usual case when you develop on multi OSes like Solaris and Windows. I hope this patch is useful and will be included soon. Thank you. -- )Hiroaki Nakamura) hnakamur@mc.neweb.ne.jp ------_=_NextPart_000_01C01478.BEEE6760 Content-Type: text/plain; name="javac.diff.txt" Content-Disposition: attachment; filename="javac.diff.txt" Index: Javac.java =================================================================== RCS file: /home/cvspublic/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v retrieving revision 1.35 diff -u -r1.35 Javac.java --- Javac.java 2000/08/15 13:34:19 1.35 +++ Javac.java 2000/09/02 00:54:47 @@ -75,6 +75,7 @@ *
  • extdirs *
  • optimize *
  • debug + *
  • encoding *
  • target * * Of these arguments, the sourcedir and destdir are required. @@ -100,6 +101,7 @@ private Path src; private File destDir; private Path compileClasspath; + private String encoding; private Vector classpathReferences = new Vector(); private boolean debug = false; private boolean optimize = false; @@ -249,6 +251,13 @@ } /** + * Set the Java source file encoding name. + */ + public void setEncoding(String encoding) { + this.encoding = encoding; + } + + /** * Set the debug flag. */ public void setDebug(boolean debug) { @@ -513,6 +522,10 @@ cmd.createArgument().setValue(target); } } + if (encoding != null) { + cmd.createArgument().setValue("-encoding"); + cmd.createArgument().setValue(encoding); + } if (debug) { cmd.createArgument().setValue("-g"); } @@ -606,6 +619,10 @@ cmd.createArgument().setValue("-classpath"); cmd.createArgument().setPath(classpath); + if (encoding != null) { + cmd.createArgument().setValue("-encoding"); + cmd.createArgument().setValue(encoding); + } if (debug) { cmd.createArgument().setValue("-g"); } ------_=_NextPart_000_01C01478.BEEE6760--