What's  sign at the beginning of my source file?

断了今生、忘了曾经 提交于 2019-11-30 19:42:36

You propably save the files as UTF-8 with BOM. You should save them as UTF-8 without BOM.

It's called Byte Order Mark, and doesn't always have to be "". http://en.wikipedia.org/wiki/Byte_order_mark

Some Windows applications add BOM by default. In Notepad++ you can use some options in the Encoding menu like Encode in UTF without BOM or Convert to UTF without BOM.

user6347371

I believe that whether you save it UTF-8 with or without BOM it still happens. I don't think it makes a difference.

Try it, see if it helps.

From a tool like vi or vim, you can modify and save the file without a BOM with the two following commands :

:setlocal nobomb

and then

:w
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!