English 中文(简体)
就业成为195年;第169号,然后成为©。 我如何解决这一令人不安的问题?
原标题:é becomes &195;#169 and then becomes é How do I fix this encoding issue?

我在Eclipse中有一只 j子,位于UTF-8,有一些含有acc子的str子。

In the java file itself, the accent is written and saved as é . In the xml that is generated using velocity the é becomes é In the pdf that is generated using fop and and an xsl template, the output is displayed as é

因此,这可能是一个令人信服的问题,所有事情都应该在UTF-8中处理。 令人ir笑皆是的是,在我管理申请的空洞环境中,整个过程和正确的镜子(/strong>)在pdf上展示。

然而,如果申请是用玉米建造的,并部署到(特殊环境) 我看到上述问题。

最佳回答

或许Eclipse正在将档案与Maven不同的<编码>javac指挥线进行汇编。

当你汇编 Java时,你必须告诉汇编者源文档的编码(如果它们含有非ASCII特性,而违约则不工作)。

javac -encoding utf8 MyCode.java

页: 1 在Maven确定这一点的方法是,在您的pom.xml档案中添加:

<project>
  ...
  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  </properties>
  ...
</project>

(I got that from a Maven FAQ about a small different issue.

否则,你就可以完全避免编码问题,在 Java档案中采用ug缩的顺序。 。 供人使用,使出租人更容易。 (正如Perlis说,“在男子-男子-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-男性-女性-男性-男性-男性-男性-女性-男性-男性-男性-男性-男性-女性-男性-男性-男性-男性-男性-男性-男性-男性-男性-女性-女性-男性-男性-男性-男性-女性-男性-女性-男性-男性-男性-女性-男性-男性-男性-男性-女性-男性-男性-女性-男性-男性-男性-男性-男性-男性-男性-男性-男性-女性-女性-女性-女性-男性-男性-男性-女性-男性-女性-男性-男性-男性-男性-男性-男性-男性-女性-男性-男性-女性-女性-男性-男性-女性-男性-女性-女性-女性-男性-女性-女性-男性-男性-男性-男性-男性-男性-女性-男性-男性-女性-女性-男性-男性-女性-女性

问题回答

暂无回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...