Giter Site home page Giter Site logo

unbom's Introduction

unbom

Tool to remove UTF-8 BOM markers from files.

why

UTF-8 BOMs are problematic and useless in common cases. A lot of tools don't support BOM markers; command-line diff tools for instance. Tools that support UTF-8, support it without markers anyway. They serve no purpose other than making our diff outputs annoying.

Visual Studio defaults to UTF-8+BOM causing the problems.

There are many shell scripts available for removing BOM markers. Many of them either slow or buggy. They assume BOM marker can appear inside a file. A careless user can easily corrupt their files. I just wanted a simple and safer tool so I spent an hour on this.

install

Install unbom by running the command:

dotnet tool install --global unbom

usage

Usage: unbom [options] <filespec>

Options:
    -r, --recurse              recurse subdirectories
    -n, --nobackup             do not save a backup file

example

unbom -r *.cs

Remove UTF-8 BOM markers from all files with ".cs" extensions and subdirectories. Saves old versions of files in "filename.bak" file.

license

MIT License. See LICENSE! file for details.

unbom's People

Contributors

skacurt avatar ssg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.