Fix for encoding errors when building Java source
authorAlexander Bohn / FI$H2k <fish2000@gmail.com>
Fri, 15 Mar 2013 09:47:52 +0000 (06:47 -0300)
committerAndrey Pavlenko <andrey.pavlenko@itseez.com>
Wed, 27 Mar 2013 13:43:00 +0000 (17:43 +0400)
The generated OpenCV Java source can contain characters outside of ASCII on some systems – this patch allows the ant task to compile them.
(cherry picked from commit f3ee55e04222deea30ffe4e89456c220bc75ff1a)

modules/java/build.xml.in

index 98ba2e3..c1c1854 100644 (file)
@@ -8,8 +8,9 @@
     <!-- http://stackoverflow.com/questions/3584968/ant-how-to-compile-jar-that-includes-source-attachment -->
     <javac sourcepath="" srcdir="src" destdir="src" debug="on" includeantruntime="false" >
       <include name="**/*.java"/>
+      <compilerarg line="-encoding utf-8"/>
     </javac>
 
     <jar basedir="src" destfile="bin/@JAR_NAME@"/>
   </target>
-</project>
\ No newline at end of file
+</project>