Last active
December 15, 2015 00:49
-
-
Save fbaligand/5175961 to your computer and use it in GitHub Desktop.
Script ANT permettant de convertir l'encoding d'une arborescence de fichiers, de ISO-8859-1 vers UTF-8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project name="native2ascii" default="native2ascii" basedir="."> | |
<property name="srcEncoding" value="ISO-8859-1" /> | |
<property name="destEncoding" value="UTF-8" /> | |
<property name="srcDir" value="${basedir}/input" /> | |
<property name="destDir" value="${basedir}/output" /> | |
<property name="tempDir" value="${basedir}/temp" /> | |
<property name="filesRegex" value="**/*.java" /> | |
<target name="native2ascii"> | |
<mkdir dir="${tempDir}"/> | |
<native2ascii encoding="${srcEncoding}" src="${srcDir}" dest="${tempDir}" includes="${filesRegex}" /> | |
<native2ascii encoding="${destEncoding}" reverse="on" src="${tempDir}" dest="${destDir}" includes="${filesRegex}" /> | |
<delete dir="${tempDir}"/> | |
</target> | |
</project> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment