2

我正在尝试创建一个 Ant 目标以将项目中的所有行尾转换为 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>

它发现目标目录没问题,但是当我运行目标时,它会将所有出现的 (£) 更改为 (�)。

我不确定我做错了什么,因为我基本上只是从 Ant Apache 手册中获取了一个示例。

4

1 回答 1

1

没关系!我发现在 fixcrlf 标签中添加 encoding="ISO-8859-1" 可以解决问题。

于 2012-11-02T16:15:17.443 回答