Ant fixCRLF 目标似乎改变了其他字符 [英] Ant fixCRLF target seems to alter other characters

查看:24
本文介绍了Ant fixCRLF 目标似乎改变了其他字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试创建一个 Ant 目标以将项目中的所有行结尾转换为 CRLF

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.

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

I'm not sure what I've done wrong as I've basically just taken one of the examples from the Ant Apache manual.

推荐答案

没关系!我发现在 fixcrlf 标签中添加 encoding="ISO-8859-1" 解决了这个问题.

Nevermind! I found that adding encoding="ISO-8859-1" into the fixcrlf tag fixed the issue.

这篇关于Ant fixCRLF 目标似乎改变了其他字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆