Android

个人Android学习总结


Properties读取中文乱码解决方案

<h2>Properties读取中文乱码解决方案</h2> <pre><code>String result; InputStream in; in =mContext.getAssets().open(&amp;quot;customer_name.cfg&amp;quot;);//获取到输入流 Properties props=new Properties(); props.load(in); result=props.getProperty(&amp;quot;key&amp;quot;);//key是键 result=new String(result.getBytes(&amp;quot;ISO-8859-1&amp;quot;), &amp;quot;utf-8&amp;quot;);//这一句是重点 System.out.println(result);</code></pre>

页面列表

ITEM_HTML