Build files: Apply explicit encoding to all operations that perform filtering.
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 21 May 2009 02:07:25 +0000 (02:07 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 21 May 2009 02:07:25 +0000 (02:07 +0000)
Those are: 1) <copy>, when filtering is used (has filtering="true" or has a nested <filterset>), 2) <fixcrlf>

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@776921 13f79535-47bb-0310-9956-ffa450edef68

build.xml
dist.xml

index 8460caa..b0290cc 100644 (file)
--- a/build.xml
+++ b/build.xml
     <copy tofile="res/manifest.tmp"
           file="res/servlet-api.jar.manifest"
           overwrite="yes"
-          filtering="true" />
+          filtering="true"
+          encoding="ISO-8859-1" />
     <jar jarfile="${servlet-api.jar}"
          manifest="res/manifest.tmp">
       <fileset dir="res">
     <copy tofile="res/manifest.tmp"
           file="res/jsp-api.jar.manifest"
           overwrite="yes"
-          filtering="true" />
+          filtering="true"
+          encoding="ISO-8859-1" />
     <jar  jarfile="${jsp-api.jar}"
           manifest="res/manifest.tmp">
       <fileset dir="res">
     <!-- Bootstrap JAR File -->
     <copy tofile="res/manifest.tmp"
           file="res/bootstrap.jar.manifest"
-          overwrite="yes">
+          overwrite="yes"
+          encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
     <jar jarfile="${bootstrap.jar}"
           <exclude name="docs/architecture/*.xml"/>
         </fileset>
     </copy>
-    <copy todir="${tomcat.build}/webapps/docs">
+    <copy todir="${tomcat.build}/webapps/docs" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
       <fileset dir=".">
         <include name="BUILDING.txt"/>
         <include name="RUNNING.txt"/>
       </fileset>
     </copy>
-    <copy tofile="${tomcat.build}/webapps/docs/RELEASE-NOTES.txt" file="RELEASE-NOTES">
+    <copy tofile="${tomcat.build}/webapps/docs/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
 
          <exclude name="**/*.bat"/>
       </fileset>
     </copy>
-    <copy todir="${tomcat.build}/bin">
+    <copy todir="${tomcat.build}/bin" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
       <fileset dir="bin">
          <include name="**/*.sh"/>
     <chmod dir="${tomcat.build}/bin" includes="*.sh" perm="+x"/>
 
     <!-- Copy static resource files -->
-    <copy todir="${tomcat.build}/conf">
+    <copy todir="${tomcat.build}/conf" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
       <fileset dir="conf">
         <include name="**/*.policy"/>
       </fileset>
     </copy>
 
-    <copy tofile="${tomcat.build}/webapps/ROOT/RELEASE-NOTES.txt" file="RELEASE-NOTES">
+    <copy tofile="${tomcat.build}/webapps/ROOT/RELEASE-NOTES.txt" file="RELEASE-NOTES" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
 
index 50f4a83..ee85226 100644 (file)
--- a/dist.xml
+++ b/dist.xml
   <target name="dist-static" depends="dist-prepare">
 
     <!-- Copy the top-level documentation files -->
-    <copy todir="${tomcat.dist}">
+    <copy todir="${tomcat.dist}" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
       <fileset dir=".">
         <include name="INSTALLING.txt"/>
     <touch file="${tomcat.dist}/temp/safeToDelete.tmp" />
 
     <!-- Correct permissions and line endings on "bin" scripts -->
-    <fixcrlf srcdir="${tomcat.dist}/bin"   includes="*.sh"  eol="lf"/>
-    <fixcrlf srcdir="${tomcat.dist}/bin"   includes="*.bat" eol="crlf"/>
+    <fixcrlf srcdir="${tomcat.dist}/bin"   includes="*.sh"  eol="lf" encoding="ISO-8859-1" />
+    <fixcrlf srcdir="${tomcat.dist}/bin"   includes="*.bat" eol="crlf" encoding="ISO-8859-1" />
     <chmod      dir="${tomcat.dist}/bin"   includes="*.sh"  perm="+x"/>
 
   </target>
     <copy file="${tomcat-native.home}/tcnative-1.dll.x86"
         tofile="${tomcat.dist}/bin/tcnative-1.dll" />
 
-    <copy file="res/tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" overwrite="true">
+    <copy file="res/tomcat.nsi" tofile="${tomcat.dist}/tomcat.nsi" overwrite="true" encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
     <exec dir="${tomcat.dist}" executable="${nsis.exe}" osfamily="windows">
     <copy file="KEYS"
          todir="${tomcat.release}/v${version}"/>
     <copy file="RELEASE-NOTES"
-         todir="${tomcat.release}/v${version}">
+         todir="${tomcat.release}/v${version}"
+         encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
     <copy file="res/welcome.main.html"
-        tofile="${tomcat.release}/v${version}/README.html">
+        tofile="${tomcat.release}/v${version}/README.html"
+        encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
     <copy file="res/welcome.bin.html"
-        tofile="${tomcat.release}/v${version}/bin/README.html">
+        tofile="${tomcat.release}/v${version}/bin/README.html"
+        encoding="ISO-8859-1">
       <filterset refid="version.filters"/>
     </copy>
 
 
   <!-- Packages the core tar.gz distro -->
   <target name="package-tgz">
-    <fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf"/>
-    <fixcrlf srcdir="${tomcat.dist}/conf" eol="lf"/>
+    <fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" />
+    <fixcrlf srcdir="${tomcat.dist}/conf" eol="lf" encoding="ISO-8859-1" />
     <tar longfile="gnu" compression="gzip"
          tarfile="${tomcat.release}/v${version}/bin/${final.name}.tar.gz">
       <tarfileset dir="${tomcat.dist}" mode="755" prefix="${final.name}">
   <!-- Packages the deployer Tomcat distro in tar.gz format -->
   <target name="package-deployer-tgz">
     <fixcrlf srcdir="${tomcat.dist}"
-     includes="*.txt,LICENSE,NOTICE" eol="lf"/>
-    <fixcrlf srcdir="${tomcat.deployer}" includes="*.xml" eol="lf"/>
+     includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" />
+    <fixcrlf srcdir="${tomcat.deployer}" includes="*.xml" eol="lf" encoding="ISO-8859-1" />
 
     <tar longfile="gnu" compression="gzip"
          tarfile="${tomcat.release}/v${version}/bin/${final.name}-deployer.tar.gz">
   <target name="package-docs-tgz">
 
     <!-- Package gocs -->
-    <fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf"/>
+    <fixcrlf srcdir="${tomcat.dist}" includes="*.txt,LICENSE,NOTICE" eol="lf" encoding="ISO-8859-1" />
 
     <tar longfile="gnu" compression="gzip"
          tarfile="${tomcat.release}/v${version}/bin/${final.name}-fulldocs.tar.gz">
   <target name="package-src-tgz">
     <fixcrlf srcdir="${tomcat.dist}/src"
      excludes="**/*.jar,**/*.gif,**/*.bmp,**/*.jpg,**/*.ico,**/*.war,**/*.exe,**/*.pdf,**/*.bin,**/*.dia"
-          eol="lf"/>
+          eol="lf" encoding="ISO-8859-1" />
     <tar longfile="gnu" compression="gzip"
          tarfile="${tomcat.release}/v${version}/src/${final-src.name}.tar.gz">
       <tarfileset dir="${tomcat.dist}/src" prefix="${final-src.name}" />