Ant fixCRLF target seems to alter other characters

大憨熊 提交于 2021-02-05 06:38:25

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!