10 releases

0.3.2 Mar 16, 2023
0.3.1 Apr 6, 2022
0.3.0 Sep 3, 2021
0.2.0 Apr 18, 2021
0.1.4 Mar 20, 2020

#93 in Text processing

Download history 7792/week @ 2023-12-23 18559/week @ 2023-12-30 13397/week @ 2024-01-06 22664/week @ 2024-01-13 20209/week @ 2024-01-20 18581/week @ 2024-01-27 19022/week @ 2024-02-03 17616/week @ 2024-02-10 17772/week @ 2024-02-17 14503/week @ 2024-02-24 16022/week @ 2024-03-02 18449/week @ 2024-03-09 18064/week @ 2024-03-16 16233/week @ 2024-03-23 19884/week @ 2024-03-30 17347/week @ 2024-04-06

74,353 downloads per month
Used in 137 crates (12 directly)

ISC license

240KB
769 lines

AnyAscii

Unicode to ASCII transliteration

Web Demo

Converts Unicode characters to their best ASCII representation

AnyAscii provides ASCII-only replacement strings for practically all Unicode characters. Text is converted character-by-character without considering the context. The mappings for each script are based on popular existing romanization systems. Symbolic characters are converted based on their meaning or appearance. All ASCII characters in the input are left unchanged, every other character is replaced with printable ASCII characters. Unknown characters and some known characters are replaced with an empty string and removed.

use any_ascii::any_ascii;

let s = any_ascii("άνθρωποι");
// anthropoi

Rust 1.42+ compatible

cargo add any_ascii

Install executable: cargo install any_ascii

$ anyascii άνθρωποι
anthropoi

$ echo άνθρωποι | anyascii
anthropoi

FULL README

No runtime deps