Skip to content

Remove BOM(Byte Order Marker) from UTF-8 files.

License

Notifications You must be signed in to change notification settings

kclckk/Utf8BomRemover

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

BomSweeper

Remove BOM(Byte Order Marker) from UTF-8 files.

Wrote this because I had some legacy source codes of several Android projects in UTF-8 with BOM, but couldn't find any software to do batching BOM removing operations on MAC OS or Windows.

##Usage

bs.py [-h] [--type TYPE] path

    path: path of the target folder or file

    -h, --help: show this help message and exit

    --type TYPE: file type, if assign the file type, only this type's file will be converted.

###Examples

Convert all files under a folder:

    python bs.py /path/to/the/target/folder

Convert all java files under a folder:

    python bs.py /path/to/the/target/folder --type java

Convert single file:

    python bs.py /path/to/the/target/filename



Note: Thanks to this answer on stackoverflow: http://stackoverflow.com/a/8898439

About

Remove BOM(Byte Order Marker) from UTF-8 files.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%