# rspeer/python-ftfy

Fixes mojibake and other glitches in Unicode text, after the fact.

Repository: https://github.com/rspeer/python-ftfy
Canonical: https://ross.abutalabs.com/products/python-ftfy
Homepage: http://ftfy.readthedocs.org
Language: Python
License: NOASSERTION
License Family: other
Last push: 2024-10-30T21:00:49+00:00

## Health v2 (maintenance only)
Score: 34/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 40, longevity 100
- inputs: {"age_days": 5122, "days_push": 672, "days_rel": 677, "gap_med": 14, "n_releases_24m": 2}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4060, forks 127 (observed 2026-08-28T04:08:34.014147+00:00)

## What it is
ftfy is a Python library that fixes mojibake (encoding mix-ups) and other Unicode text glitches after the fact, recovering original text from mis-decoded UTF-8. It also provides a command-line interface for fixing text files.

## Use cases
- fix mojibake in scraped text
- clean up garbled unicode characters in a dataset
- repair text that was decoded with the wrong encoding
- fix broken utf-8 strings in python
- clean text before training a language model
- undo double-encoded unicode

## When to choose
- you have text with visible mojibake like 'âœ”' or 'Ã©' that needs repair
- you're cleaning web-scraped or user-submitted text for NLP pipelines
- you want a well-tested, heuristic-based fixer rather than writing encoding hacks yourself

## When to avoid
- you need general encoding detection for unknown files rather than fixing known mojibake
- you need to normalize or transliterate text rather than repair encoding errors
- you're not working in Python and can't use the CLI

## Facets
- artifact type: library
- maturity: stable
- function: nlp, parser, developer-tools
- domain: developer-tools, text-editors
- platform: python, cli, cross-platform
- tags: unicode, mojibake, text-cleaning, encoding-fixes, data-cleaning, natural-language-processing

## Member repositories
- rspeer/python-ftfy (main) score 34

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:34.014147+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:35.825241+00:00, confidence not recorded.
  - readme: https://github.com/rspeer/python-ftfy (fetched 2026-08-28T04:08:34.014147+00:00, sha 5a3c0fefdf29)
- Data as of 2026-08-30T08:39:29.467469+00:00.
