#character-encoding #utf-8 #unicode

app enc-check

A tool to inspect utf-8 and utf-16 character encodings

2 releases

0.1.1 Oct 11, 2023
0.1.0 Oct 7, 2023

#1800 in Text processing

GPL-3.0-only

18KB
180 lines

enc-check

Installation

cargo install enc-check

Usage

Inspect character encodings.

enc-check --help

Usage: enc-check [OPTIONS] <-8|-6> <NAME>

Arguments:
  <NAME>
          The string to inspect

Options:
  -8
          Inspect utf-8
  -6
          Inspect utf-16
  -j, --json
          Output as json. Useful as a command line tool
  -h, --help
          Print help
enc-check -8 asdᚢ𐌰

┌───────┬───────┬───────────┬──────┬─────┬─────┬──────────┐
│ U+dec │ U+hex │ character │ byte │ hex │ dec │ bin      │
├───────┼───────┼───────────┼──────┼─────┼─────┼──────────┤
│ 9761    │ a         │ 0619701100001 │
│ 11573    │ s         │ 17311501110011 │
│ 10064    │ d         │ 26410001100100 │
│ 5794  │ 16a2  │ ᚢ         │ 3    │ e1  │ 22511100001 │
│       │       │           │ 4    │ 9a  │ 15410011010 │
│       │       │           │ 5    │ a2  │ 16210100010 │
│ 6635210330 │ 𐌰         │ 6    │ f0  │ 24011110000 │
│       │       │           │ 79014410010000 │
│       │       │           │ 8    │ 8c  │ 14010001100 │
│       │       │           │ 9    │ b0  │ 17610110000 │
└───────┴───────┴───────────┴──────┴─────┴─────┴──────────┘

Dependencies

~3.5–5MB
~93K SLoC