蚂蚁fixCRLF目标似乎改变了其他角色 [英] Ant fixCRLF target seems to alter other characters

查看:86
本文介绍了蚂蚁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.

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

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