打赏

星辰大海ゞ

That which does not kill us makes us stronger!

导航

linux文件格式转换:<U+FEFF> character showing up in files. How to remove them?

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

 

 

posted on 2014-06-10 15:46  星辰大海ゞ  阅读(1037)  评论(0编辑  收藏  举报