Java read file got a leading BOM [  ]

前端 未结 6 1300
孤独总比滥情好
孤独总比滥情好 2020-12-20 23:15

I am reading a file containing keywords line by line and found a strange problem. I hope lines that following each other if their contents are the same, they should be handl

6条回答
  •  再見小時候
    2020-12-20 23:47

    What is the encoding of the file?

    The unseen char at the start of the file could be the Byte Order Mark

    Saving with ANSI or UTF-8 without BOM can help highlight this for you.

提交回复
热议问题