items[i]=new String(items[i].getBytes("ISO-8859-1"),"UTF-8");
网上不少相关文章,参考文章
http://blog.csdn.net/shixing_11/article/details/5652347
http://www.wenhq.com/article/view_330.html
补充,items[i]=new String(items[i].getBytes("ISO-8859-1"),"UTF-8");
如果在preferences->content types->text->java properties file 编码方式为 utf-8 则
new String(items[i].getBytes("ISO-8859-1"),"UTF-8"); 为"UTF-8"
为GBK则为GBK
java properties 空白字符
1.注释符为:'#'或者'!'。空白字符为:' ', '\t', '\f'。key/value分隔符为:'='或者':'。行分隔符为:'\r','\n','\r\n'。