Research Workflow

Audit Unicode Differences Before Matching Text Identifiers

Start with the identifier’s meaning

Two strings can look identical while containing different Unicode code points. Conversely, characters that look similar can have different meanings. Decide whether the field is a human-readable label, a controlled code or an exact external identifier before applying a normalization rule.

Python’s Unicode documentation describes canonical and compatibility normalization forms. These are transformations with defined behavior, not universal permission to rewrite identifiers. Preserve the original text and produce a separate normalized comparison field when normalization is justified.

Diagnose before changing

Inspect suspicious pairs by code point or escaped representation. Check ordinary versus nonbreaking spaces, composed versus decomposed accents and unexpected formatting characters. Do not assume that lowercasing, accent removal or punctuation deletion is harmless. A case-sensitive identifier can become ambiguous after a well-intentioned cleanup.

Choose a rule tied to the source specification. Canonical normalization may reconcile equivalent accent representations in labels. Compatibility normalization can make broader changes, so it needs a more careful collision audit. Record the normalization form, library version and any additional operations such as trimming.

Follow a hypothetical collision check

Imagine two labels: a single composed é character and an e followed by a combining acute accent. They are different raw sequences but become equal under NFC normalization. For a display label this may be the intended reconciliation; for a byte-level file digest they remain different original inputs.

Suppose 1,000 raw identifiers produce 998 distinct normalized values. Do not declare that two duplicates were removed successfully. List the collision groups and investigate whether they represent duplicate encodings of the same entity or genuinely different identifiers collapsed by the rule. The two-value reduction is a review queue, not an automatic deletion count.

Preserve reversible decisions

Maintain original value, normalized value, rule version, collision status and adjudication. Apply the same approved rule on both sides of a match and report how many matches it adds or changes. Never overwrite the only copy of the source key.

For multilingual research data, ask someone familiar with the language when a transformation could alter meaning. Transliteration is a separate operation from normalization and can be many-to-one. The final deliverable should explain why a particular comparison became equal, while retaining enough information to undo the transformation and inspect every collision that affected a join or participant count.

Source verification: 6 November 2026. Examples are hypothetical.

Related reading

Reading path: Prepare data. Guide 15 of 50. Choose any guide to suit your project.

Research Workflow

Audit Survey Strata and Primary Sampling Unit Identifiers

Check nesting, singleton strata and design metadata before estimating survey uncertainty.

Research Workflow

Audit a case-cohort sample before modelling

Preserve subcohort membership, cohort sizes and sampling strata so the analysis reflects the design.

Browse this reading pathTools for this stageGuides and downloads for this stage