编码我有一个测试脚本:如何在蚂蚁
<?xml version="1.0" encoding="UTF-8"?>
<project name="test" basedir=".">
<echo encoding="UTF-8" file="test.txt">测试</echo>
</project>
当我打开test.txt的。我只看到“??”
更奇怪的东西。使用Eclipse Ant工具运行脚本没有问题,但它在命令行中有问题。
Eclipse和CMD使用相同的Ant库。
是你的测试脚本保存在,你怎么打开'test.txt'什么编码? – deceze
脚本以UTF-8格式保存。我用UTF-8打开test.txt – performanceuser