FAILURE MAP
← Case archive

FA-2861 / Unicode / Open access

Accent removal drops non-Latin letters · case 01

Accent removal drops non-Latin letters.

Verified by executionVariant 1 · 4 checks per implementationDownload source bundle ↓JSON ↗

ROOT CAUSE

The implementation applies an operation whose text or grammar semantics violate this contract: NFD-decompose and remove only characters with nonzero combining class.

VERIFIED REPAIR

Implement the complete stated contract, including the boundary fixtures: NFD-decompose and remove only characters with nonzero combining class.

Unsuccessful approach: The attempted repair handles the primary example but still violates a separate boundary of the same contract.

Case contract

NFD-decompose and remove only characters with nonzero combining class.

Why this case matters

A local executable model for consumers of structured text; oracle values are authored literals, not outputs copied from the repaired implementation.

1 / The failure

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return x.encode('ascii','ignore').decode()
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('café'), 'cafe')
check('boundary 2', solve('Ω'), 'Ω')
check('boundary 3', solve('️'), '️')
check('boundary 4', solve('á'), 'a')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1cafcafeFailed
boundary 2ΩFailed
boundary 3️Failed
boundary 4aaPassed

SHA-256 / d7847a1227e75000ac5557b024b07500fa55128986e91d0b877f9efc6985dde6

2 / The unsuccessful fix

Exit 1
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return ''.join(c for c in unicodedata.normalize('NFD',x) if unicodedata.category(c) != 'Mn')
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('café'), 'cafe')
check('boundary 2', solve('Ω'), 'Ω')
check('boundary 3', solve('️'), '️')
check('boundary 4', solve('á'), 'a')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1cafecafePassed
boundary 2ΩΩPassed
boundary 3️Failed
boundary 4aaPassed

SHA-256 / bc14271056ae787666c90f26d474fc52f1a9e591b5d2e093dc13d5b92abe9be4

3 / The verified repair

Exit 0
"""Failure Map reference implementation. Python standard library only."""
import json
import re, unicodedata, json, csv, io, html, base64, binascii, codecs, struct
from urllib.parse import quote, unquote, unquote_to_bytes, urlencode, parse_qsl, urlsplit, urlunsplit
from email.header import decode_header, make_header
from email.utils import getaddresses
from xml.etree import ElementTree as ET
import shlex, string, textwrap

N = 1
observations = []
def solve(x):
    try:
        return ''.join(c for c in unicodedata.normalize('NFD',x) if not unicodedata.combining(c))
    except Exception as exc:
        return {"error": type(exc).__name__}
def check(label, actual, expected):
    observations.append({"check": label, "actual": actual, "expected": expected, "passed": actual == expected})
check('boundary 1', solve('café'), 'cafe')
check('boundary 2', solve('Ω'), 'Ω')
check('boundary 3', solve('️'), '️')
check('boundary 4', solve('á'), 'a')
print(json.dumps({"observations": observations, "passed": all(x["passed"] for x in observations)}, ensure_ascii=False))
raise SystemExit(0 if all(x["passed"] for x in observations) else 1)
Boundary fixtureActualExpectedOutcome
boundary 1cafecafePassed
boundary 2ΩΩPassed
boundary 3️️Passed
boundary 4aaPassed

SHA-256 / 8e66f17d104799d3411c39a6b24518e5dee0709c12131f20e780b0ce7765473d

Verification & scope

This reproducer isolates one failure mechanism. Results cover the supplied fixtures. Variants within a family share a test contract and should remain grouped when constructing evaluation splits. Related mechanisms with a shared evaluation_group must also remain together; these controlled models are not independent production incidents.

Observations recorded using Python 3.12.14 at 2026-09-29T14:37:18.014612+00:00.

Case digest / 8a0e70bcf1f340c1642c98c43c9abecdcdd3533782c05909006d087b0fb565dd