문제

I want to remove \xef\xbb\xbf marks (BOM) from my file. It's a text file to be fed to python, and the BOM marks are causing problems there. I tried :set nobomb but those are still there. How can I solve this problem and what might have caused this problem?

UPDATE: My file is obtained by combining (concatenating) many other files (using obabel software) each of which has BOM. So, probably set nobomb removes BOM mark only at the beginning of the new file. In such cases, how can I remove all BOMs?

도움이 되었습니까?

해결책

If the byte sequences are embedded in your buffer, a

:%substitute/\%ufeff//g

might already do the trick.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top