0
我正在阅读包含€欧元符号的属性文件。当它在屏幕上打印时,看起来完全不同。我比较了来自道具文件的字符串,并通过使用equals方法声明另一个具有相同文本的字符串,它是false.Pls可以有人帮助我。欧元符号显示不正确来自适当的文件
properities file
your purchase order is €
string text="your purchase order is €";
on comparing the above strings it fails.
************************
public String getProperty(String arg0) {
Properties prop = new Properties();
InputStream input = null;
try {
input = new FileInputStream("C:/text.properties");
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
try {
prop.load(input);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return prop.getProperty(arg0);
}
它是如何显示的? – 2014-08-29 15:59:10
你在哪里输出它? IDE控制台?贝壳 ? – ortis 2014-08-29 16:06:15