nobom

Crates.ionobom
lib.rsnobom
version0.1.0
created_at2025-08-17 03:51:56.585923+00
updated_at2025-08-17 03:51:56.585923+00
descriptionA simple utility to remove UTF-8 BOM (Byte Order Mark) from stdin and write to stdout
homepage
repository
max_upload_size
id1799108
size38,858
AN Long (aisk)

documentation

README

nobom

A simple utility to remove UTF-8 BOM (Byte Order Mark) from stdin and write to stdout.

Usage

After installation:

echo -e "\xEF\xBB\xBFHello, world!" | nobom

Or with files:

nobom < file_with_bom.txt

Development usage

cargo run < file_with_bom.txt

Features

  • Streaming processing - handles large files with minimal memory usage
  • Removes UTF-8 BOM (EF BB BF) if present at the beginning
  • Passes through data unchanged if no BOM is found
  • Works with any text data

Installation

From crates.io (recommended)

cargo install nobom

From source

git clone https://github.com/aisk/nobom.git
cd nobom
cargo build --release

The binary will be available at target/release/nobom.

Example

# Create a file with BOM
printf '\xEF\xBB\xBFHello, world!' > test.txt

# Remove BOM (after installation)
nobom < test.txt > output.txt

# Or during development
cargo run < test.txt > output.txt
Commit count: 0

cargo fmt