java - 如图,a.txt文件开头什么都没有,FileInputstream读取的时候为什么还会出现乱码?
PHPz
PHPz 2017-04-18 10:48:36
0
5
629

PHPz
PHPz

学习是最好的投资!

reply all(5)
巴扎黑

If you are windows平台开发,建议使用nodepad++,并选择以UTF-8无BOM格式编码

Ty80

may be invisible characters

刘奇

Try saving the file as utf-8 format

巴扎黑

Is there a BOM head

刘奇

This problem may occur when you use Notepad or the like to save files under Windows. Notepad automatically inserts three invisible bytes 0xEF 0xBB 0xBF, generally called the BOM header.

You can output these three bytes as hexadecimal or decimal to see if they are these three numbers

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!