Unicode Normalize

v0.1.0Added Sep 26, 2026Sample data

Unicode cleanup for text pipelines: NFC/NFKC normalization, whitespace folding and removal of invisible characters.

Sample data. These figures are placeholders, not measurements.

cargo install kura-rs
kura add unicode-normalize

Copies the source file into your project. You own the code from then on.

If another tool already installs a kura command, run cargo install kura-rs --bin kura-rs and use kura-rs add instead.

use crate::parts::unicode_normalize::{normalize, Options};

let clean = normalize(&raw, Options::nfkc().fold_whitespace().strip_invisible());

Verification

Sample data

Checked against unicodedata 3.12 (Python) using property-based testing: the same inputs go to both implementations and the outputs are compared.

Reference
unicodedata
Python 3.12
Test cases
10,000
Property-based testing
Passed
10,000 / 10,000
All cases match
Last run
Sep 26, 2026
UTC

These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.

Benchmarks

Sample data

kura-rs (Rust) against unicodedata across input sizes. Faster from about 143 inputs, up to 2.2× faster.

These numbers are placeholders. They have not been measured yet and must not be read as real results. This part is marked "sample": true in its registry file.

kura-rs (Rust)unicodedata
Wall time per run (lower is better). The shaded region is where the reference implementation is faster.
Show data table
Input sizekura-rs (Rust)unicodedataSpeedup
100.01 ms0 ms3.0× slower
1000.02 ms0.02 ms1.1× slower
1,0000.09 ms0.16 ms1.8×
10,0000.8 ms1.7 ms2.1×
100,0007.9 ms17 ms2.2×
1,000,00078 ms172 ms2.2×

Files

  • parts/unicode_normalize/mod.rs

Crate dependencies