蚂蚁:警告:编码 UTF8 的不可映射字符 [英] ant: warning: unmappable character for encoding UTF8

查看:58
本文介绍了蚂蚁:警告:编码 UTF8 的不可映射字符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我见过很多像我这样的问题,但他们没有回答我的问题,因为我使用的是 ant 而我没有使用 eclipse.我运行此代码:ant clean dist 并多次告诉我warning: unmappable character for encoding UTF8.

I have seen numerous of questions like mine but they don't answer my question because I'm using ant and I'm not using eclipse. I run this code: ant clean dist and it tells me numerous times that warning: unmappable character for encoding UTF8.

我在 Java 命令上看到有一个 -encoding 选项,但这对我没有帮助,因为我正在使用 ant.

I see on the Java command that there is a -encoding option, but that doesn't help me cuz I'm using the ant.

我使用的是 Linux,我正在尝试运行 Sentrick 的开发者版本;我没有对任何东西做任何修改,我只是下载了它并关注了他们所有的 说明 并没有什么区别.我给开发人员发了电子邮件,他们告诉我这是这个问题,但我怀疑这实际上与最后的这个错误有关:

I'm on Linux and I'm trying to run the developer version of Sentrick; I haven't made no modifications to anything, I just downloaded it and followed all their instructions and it ain't makes no difference. I emailed the developper and they told me it was this problem but I suspect that it is actually something that gotta do with this error at the end:

BUILD FAILED
/home/daniel/sentricksrc/sentrick/build.xml:22: The following error occurred while executing this line:
/home/daniel/sentricksrc/sentrick/ant/common-targets.xml:83: Test de.denkselbst.sentrick.tokeniser.components.DetectedAbbreviationAnnotatorTest failed

我不确定我现在要做什么,因为我真的需要它来工作

I'm not sure what I'm gonna do now because I really need for it to work

推荐答案

尝试更改源文件的文件编码并将默认 Java 文件编码也设置为 UTF-8.

Try to change file encoding of your source files and set the Default Java File Encoding to UTF-8 also.

对于蚂蚁:

-Dfile.encoding=UTF8 添加到您的 ANT_OPTS 环境变量

add -Dfile.encoding=UTF8 to your ANT_OPTS environment variable

将默认 Java 文件编码设置为 UTF-8:

Setting the Default Java File Encoding to UTF-8:

export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8

或者你可以用参数-Dfile.encoding=UTF8

这篇关于蚂蚁:警告:编码 UTF8 的不可映射字符的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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