--- id: fold-to-ascii version: "1.0.2.post1" license: MIT License license_treatment: permissive maintenance: abandoned --- # fold-to-ascii — A Python port of the Apache Lucene ASCII Folding Filter that converts alphabetic, numeric, and symbolic Unicode characters which are not in the first 127 ASCII characters (the ‘Basic Latin’ Unicode block) into ASCII equivalents, if they exist. License: permissive · Maintenance: abandoned · Downloads: 151.8K/mo ## What it is and what it does fold_to_ascii is a lightweight Python library that strips Unicode characters down to their ASCII equivalents. It converts accented letters, symbols, and other non-ASCII Unicode characters into plain ASCII representations—for example, turning 'paté' into 'pate' and '®' into nothing (or a custom replacement character you specify). It's based on Apache Lucene's ASCII Folding Filter, making it predictable for text processing workflows that need ASCII-safe output. The package has no runtime dependencies and installs as a simple pure-Python wheel. It differs from other Unicode-to-ASCII libraries by allowing you to specify a custom replacement character for unmapped symbols, rather than forcing the empty string. However, it has been unmaintained since 2020-05-03, so it receives no updates or security reviews. Use it for: - Normalize user-generated text for search indexing or database storage where ASCII-only fields are required - Clean up product names or URLs containing accented characters for compatibility with legacy systems - Prepare multilingual text for ASCII-based APIs or services that don't handle Unicode - Sanitize input text for filename generation or slug creation in web applications - Deduplicate search queries by folding accented variants to a common ASCII form ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Converts Unicode characters outside the basic ASCII range into their ASCII equivalents or a specified replacement character, following the Apache Lucene ASCII Folding Filter approach. Yes, if you need straightforward Unicode-to-ASCII folding with no dependencies and can tolerate an unmaintained package. The library is simple, has no vulnerabilities on record, and works for its narrow purpose. Install it only if you're comfortable with a codebase last updated in 2020-05-03 and have no expectation of future updates or support. ## Install pip install fold-to-ascii uv add fold-to-ascii poetry add fold-to-ascii ## Installing fold-to-ascii Before you install: Installation is straightforward with no runtime dependencies. However, the package has been abandoned since its last release on 2020-05-03, so maintenance and security fixes are not expected. License in practice: Licensed under MIT License (permissive), allowing free use, modification, and distribution with minimal restrictions. Quickstart: from fold_to_ascii import fold s = u'Astroturf® paté' result = fold(s) # result: u'Astroturf pate' # With custom replacement character: result = fold(s, u'?') # result: u'Astroturf? pate' Verify before relying: - Whether astral character removal behavior (always removed even with replacement specified) is acceptable for your use case - Current compatibility with modern Python versions beyond what the fact sheet specifies ## Package facts - License: MIT License (permissive) - Python support: unspecified - Install friction: low - Maintenance: abandoned - Downloads: 151.8K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags unicode to ascii conversion, remove diacritics python, ascii folding filter, unicode normalization, text sanitization, character folding, diacritic removal, text-normalization, unicode-handling [View on SkillFed](https://skillfed.io/packages/fold-to-ascii) · [View on PyPI](https://pypi.org/project/fold-to-ascii/)