Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save gianv9/c88c75ae5f5f149dc203790707b6f265 to your computer and use it in GitHub Desktop.

Select an option

Save gianv9/c88c75ae5f5f149dc203790707b6f265 to your computer and use it in GitHub Desktop.

Revisions

  1. @szydan szydan revised this gist Nov 23, 2014. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -11,4 +11,10 @@ vim file_name

    // taken from:

    http://stackoverflow.com/questions/7297888/ufeff-character-showing-up-in-files-how-to-remove-them
    http://stackoverflow.com/questions/7297888/ufeff-character-showing-up-in-files-how-to-remove-them

    Another recipe using awk
    http://stackoverflow.com/questions/1068650/using-awk-to-remove-the-byte-order-mark

    awk '{ if (NR==1) sub(/^\xef\xbb\xbf/,""); print }' INFILE > OUTFILE

  2. @szydan szydan created this gist Nov 4, 2014.
    14 changes: 14 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    1) In your terminal, open the file using vim:

    vim file_name
    2) Remove all BOM characters:

    :set nobomb
    3) Save the file:

    :wq


    // taken from:

    http://stackoverflow.com/questions/7297888/ufeff-character-showing-up-in-files-how-to-remove-them