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

#117 in Text processing

Download history 28597/week @ 2024-07-20 28849/week @ 2024-07-27 35116/week @ 2024-08-03 26047/week @ 2024-08-10 46884/week @ 2024-08-17 24187/week @ 2024-08-24 21353/week @ 2024-08-31 20790/week @ 2024-09-07 17255/week @ 2024-09-14 17396/week @ 2024-09-21 20669/week @ 2024-09-28 24006/week @ 2024-10-05 28204/week @ 2024-10-12 27062/week @ 2024-10-19 31775/week @ 2024-10-26 27291/week @ 2024-11-02

117,899 downloads per month
Used in 164 crates (14 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