You can easily remove them using vim, here are the steps:

1) In your terminal, open the file using vim:

vim file_name

2) Remove all BOM characters:

:set nobomb

3) Save the file:

:wq

或使用Notepad++打开文件后,“格式”--->“
以UTF-8无BOM格式编码
” 然后保

--------------------------------------------------------------------------------------------------

vim编辑模式下可以利用如下命令查看文件格式 
:set ff 或 :set fileformat 
可以看到如下信息 
fileformat=dos 或 fileformat=unix


vim编辑模式下利用如下命令修改文件格式 
:set ff=unix 或 :set fileformat=unix

 

 

相关文章:

  • 2022-12-23
  • 2022-02-16
  • 2022-12-23
  • 2021-04-15
  • 2022-03-04
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
猜你喜欢
  • 2021-11-01
  • 2021-11-21
  • 2022-12-23
  • 2021-07-20
  • 2021-09-28
  • 2022-12-23
相关资源
相似解决方案