Files
fexcel/README.md
2025-12-16 11:12:44 +01:00

1.2 KiB
Raw Permalink Blame History

fexcel

A simple command-line tool to sanitize invalid UTF-8 sequences from input streams.

Overview

fexcel reads data from stdin, replaces any invalid UTF-8 sequences with the Unicode replacement character (<28>), and writes the sanitized output to stdout. This is particularly useful when working with files that may contain mixed or invalid encodings, such as Windows-exported CSV files.

Installation

mise run install # or
cargo install --path . --force

Or build from source:

cargo build --release

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

Usage

Use fexcel as a pipe filter to clean input before passing it to tools that require valid UTF-8:

cat my-windows-exported.csv | fexcel | csvlens

Without fexcel, tools like csvlens may fail with invalid UTF-8 errors. By piping through fexcel first, you can safely view and process files with encoding issues.

Additional Examples

Clean a file and save the output:

cat problematic-file.txt | fexcel > cleaned-file.txt

Use with any UTF-8 sensitive tool:

cat messy-data.log | fexcel | grep "pattern"

License

See LICENSE file for details.