问题
I'm trying to create an Ant target to convert all line endings in a project to CRLF
<target name="eol-conversion">
<echo message="Converting EOL" />
<property name="workspace.root" location="../../.." />
<property name="theproject" location="${workspace.root}/theproject" />
<echo message="${theproject}" />
<fixcrlf srcdir="${theproject}" includes="**/*.fileext" eol="crlf" />
</target>
It finds the target directory ok, but it changes all occurrences of (£) to (�) when I run the target.
I'm not sure what I've done wrong as I've basically just taken one of the examples from the Ant Apache manual.
回答1:
Nevermind! I found that adding encoding="ISO-8859-1" into the fixcrlf tag fixed the issue.
来源:https://stackoverflow.com/questions/13197379/ant-fixcrlf-target-seems-to-alter-other-characters