Skip to content
Back to skills

En

ASecurity

Mojibake repair for double/triple encoded UTF-8. Fixes Windows cp1252/Latin-1 misinterpretations. Zero dependencies.

  • 6 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 4, 2026
ai-agentspythongobashgit

Works with

  • cli

Security analysis

A100/100

Scanned September 28, 2026

npx -y skills add ellmos-ai/skills --skill en --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of En?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for En
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ellmos-ai-skills-e37ff2f6/badge)](https://www.skillsdirectory.com/skills/ellmos-ai-skills-e37ff2f6)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: encoding-fix
version: 1.0.0
type: tool
author: Lukas Geiger
created: 2026-03-12
updated: 2026-03-12
description: Mojibake repair for double/triple encoded UTF-8. Fixes Windows cp1252/Latin-1 misinterpretations. Zero dependencies.
standalone: true
anthropic_compatible: true
bach_compatible: true
bach_origin: true
category: utilities
tags: [encoding, utf-8, mojibake, windows, cp1252, text-repair]
language: en
status: active
dependencies: {'tools': [], 'services': [], 'protocols': [], 'python': []}
provenance: {'origin': 'bach', 'origin_path': 'system/tools/encoding_fix.py', 'origin_version': '1.0.0', 'origin_repo': 'github.com/ellmos-ai/bach', 'last_sync_from_origin': '2026-03-12', 'last_sync_to_origin': None, 'local_changes_since_sync': False}
---

<img src="../banner.png" width="100%" alt="encoding-fix banner">

> **English** — Official English version of `encoding-fix`.


# Encoding Fix (English)

Repairs mojibake (double/triple encoded UTF-8) caused by Windows cp1252/Latin-1
misinterpretation. Zero dependencies — Python stdlib only.

## Typical Problem

```
"ue" (U+00FC) -> UTF-8 \xc3\xbc -> read as cp1252 -> "ü"
```

## Usage

### As Library
```python
from encoding_fix import sanitize_outbound

clean = sanitize_outbound("Würge")  # -> "Wuerge"
```

### Subprocess Output
```python
from encoding_fix import sanitize_subprocess_output

text = sanitize_subprocess_output(process.stdout)
```

### CLI
```bash
python encoding_fix.py "Würge"    # Check a single string
python encoding_fix.py              # Self-test
```

## Features

- **Idempotent:** Correctly encoded text is not modified
- **Up to 3 rounds:** Repairs even triple-encoded strings
- **Subprocess decoder:** UTF-8/cp1252 fallback for process output
- **Zero dependencies:** Python stdlib only

## Changelog

### 1.0.0 (2026-03-12)
- Ported from BACH system/tools/encoding_fix.py

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…