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