Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. decancer

decancer

MITRustv3.3.3

A library that removes common Unicode confusables, homoglyphs, and diacritics from strings to normalize text.

GitHubGitHub
131 stars5 forks0 contributors

What is decancer?

decancer is a library that removes common Unicode confusables, homoglyphs, and diacritics from strings. It solves the problem of text obfuscation used in spam, evasion, or visual confusion by normalizing input to a clean, readable form. The library is built for performance and accuracy, supporting multiple programming languages.

Target Audience

Developers building applications that require text sanitization, such as chat platforms, content moderation systems, or security tools that need to handle user-generated input safely.

Value Proposition

Unlike other text filtering libraries, decancer is unicode bidirectional-aware and handles a wide range of confusables efficiently. Its Rust core ensures high speed, and its multi-language bindings make it accessible across different tech stacks.

Overview

A library that removes common unicode confusables/homoglyphs from strings.

Use Cases

Best For

  • Filtering homoglyph attacks in usernames or domains
  • Cleaning Zalgo text from user inputs in forums or chats
  • Normalizing leetspeak in content moderation pipelines
  • Sanitizing strings for database storage to prevent encoding issues
  • Improving search accuracy by removing diacritics and confusables
  • Securing applications against Unicode-based evasion techniques

Not Ideal For

  • Applications that must preserve original Unicode characters for linguistic or cultural accuracy, such as multilingual text processing where diacritics are essential.
  • Simple string manipulation tasks without security concerns, where basic trim or case functions would suffice without the overhead.
  • Environments with strict dependency constraints that cannot accommodate native code bindings or Rust toolchains.
  • Projects needing context-aware text normalization beyond character-level, like semantic analysis or natural language understanding.

Pros & Cons

Pros

High Performance Core

Core is written in Rust using binary search, ensuring fast processing for filtering over 222,557 Unicode codepoints, as highlighted in the README.

Bidirectional Text Awareness

Correctly interprets right-to-left characters as rendered, unlike other packages, improving accuracy in security and moderation contexts.

Extensive Unicode Coverage

Filters homoglyphs, diacritics, leetspeak, Zalgo text, and emojis, covering a wide range of evasion techniques.

Multi-Language Bindings

Available in Rust, JavaScript, Java, C/C++, Go, and Python, making it accessible across diverse tech stacks for integration.

Customizable Filtering

Highly configurable behavior allows tailoring to specific needs, as emphasized in the philosophy and examples.

Cons

Complex Setup for Some Bindings

Installation for Go requires Rust and elevated permissions, and C/C++ involves platform-specific downloads, adding deployment complexity.

Unofficial Python Support

Python bindings are listed as unofficial, which may lead to inconsistent updates or limited maintenance compared to core languages.

Custom String Type Limitations

Output is a CuredString object that shouldn't be coerced to regular strings, complicating integration with existing string processing code.

Potential Over-filtering Risks

Aggressive filtering of many codepoints might inadvertently remove legitimate characters in niche use cases, despite customizability.

Frequently Asked Questions

Quick Stats

Stars131
Forks5
Contributors0
Open Issues3
Last commit3 days ago
CreatedSince 2021

Tags

#unicode#text-sanitization#sanitizer#moderation#security#homoglyphs#string#string-processing#rust-library#content-moderation

Built With

R
Rust

Included in

Rust56.6k
Auto-fetched 8 hours ago

Related Projects

ripgrep-allripgrep-all

rga: ripgrep, but also search in PDFs, E-Books, Office documents, zip, tar.gz, etc.

Stars9,831
Forks217
Last commit5 months ago
KreuzbergKreuzberg

Polyglot document intelligence with a Rust core: extract text, metadata, images, tables, and structured data from 106 formats across 140 file extensions, plus code intelligence for 371 languages. Fifteen bindings, with CLI, REST API, and MCP server.

Stars9,275
Forks582
Last commit12 hours ago
grexgrex

A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

Stars8,182
Forks198
Last commit6 months ago
MelodyMelody

Melody is a language that compiles to regular expressions and aims to be more readable and maintainable

Stars4,744
Forks59
Last commit1 year ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub