BlogIntegrations · October 26, 2026 · 5 min read

Contact Form 7 Unicode Lead Data: Preserve Names and Normalize Comparison Copies

Handle equivalent Unicode encodings in CF7 lead integrations, preserve display values, and test normalized comparison keys without merging people by name.

Whole and segmented circles preserved in a folder and compared through a magnifying glass beside a form.
Generated conceptual illustration; not a product screenshot or measured result.

Two Contact Form 7 answers can look identical and still contain different Unicode sequences. That matters when a custom lead connector compares text byte for byte, builds a match key or sends an answer to a destination with different text handling. A careful workflow preserves the accepted display value and creates a separate, documented comparison copy.

This is a guide to integration design, not a report of a CF7 defect. Whitespace cleanup and required-field rules solve different problems; our whitespace guide and custom-validation guide cover those boundaries.

Reproduce an encoding difference with synthetic text

Unicode permits a character such as an accented letter to have canonically equivalent representations. One sequence can contain a precomposed character; another can contain a base letter followed by a combining mark. They can render the same while ordinary string equality returns false.

This small JavaScript fixture compares two synthetic values without submitting a form:

const composed = 'Caf\u00e9';
const decomposed = 'Cafe\u0301';

console.log(composed === decomposed); // false
console.log(
  composed.normalize('NFC') === decomposed.normalize('NFC')
); // true

The JavaScript normalization reference explains the available forms. This example checks canonical equivalence. It does not show a spelling correction, remove an accent or establish that two submissions belong to the same person.

Separate display values from comparison derivatives

Keep the accepted name or organization value available for communication and review, subject to your retention policy. Create the comparison derivative in a separate field or processing step. Record the normalization policy and version so the next developer can reproduce it. Avoid rewriting every historical lead simply because a new key is convenient.

Be precise about what “original” means in your system. A value already accepted and stored by a form workflow may have passed through validation or sanitization. Do not claim to preserve the visitor’s exact original bytes unless your collection design actually does so. The practical goal is to avoid additional destructive changes in the matching pipeline.

Choose canonical normalization intentionally

Unicode Standard Annex 15 distinguishes canonical normalization from compatibility normalization. NFC is a common starting point for a comparison copy where canonically equivalent representations should compare equally. Compatibility forms can collapse additional distinctions, so selecting NFKC requires a different, explicit policy.

Normalization does not automatically transliterate scripts, remove diacritics, resolve lookalike characters or make casing equivalent. Adding those transformations changes the match rule. Review each one separately, including examples that must stay distinct. Do not describe a normalized name as a verified identity or use name equality alone to merge customer records.

Apply the policy in the responsible integration layer

A browser-only transformation is insufficient when records can also enter through imports, administrative tools or other APIs. Put the authoritative comparison policy in the receiver or shared processing component that handles those paths. A frontend preview may be helpful, but it should use the same documented rule.

For a PHP integration, the Normalizer reference documents normalization through the intl extension. Check that the extension is available in the actual worker runtime and handle a failed normalization result. A successful local example does not prove that the production worker has the same extensions or data path.

Keep the change outside the mail-success decision unless your workflow specifically requires otherwise. Failure to build an optional comparison key should enter an observable review path. It should not silently erase a lead or convert a duplicate guess into a failed form submission.

Respect real names and field-specific meaning

The W3C’s personal-name guidance explains why assumptions about naming structure and character sets can exclude legitimate users. Avoid replacing a free-text name with an ASCII-only whitelist just to simplify a downstream join. Collect only the components the service actually needs.

Do not apply one generic “clean string” function to names, email addresses, reference codes and free-text messages. Each field has its own meaning and destination rules. The CF7 text-field reference documents field types and options; your connector still needs its own contract for comparison and storage.

Test equivalence and non-equivalence

  • Verify that composed and decomposed forms of the same synthetic word produce the expected key.
  • Verify that an accented and unaccented word remain distinct under an NFC-only rule.
  • Include two different people with the same display name and confirm that no automatic merge occurs.
  • Check missing values, invalid encoding and runtime normalization failures.
  • Run a value through export, reimport and the destination API to check preservation at each boundary.

Inspect actual stored and returned values, not only how a spreadsheet displays them. Keep personal details out of test logs and analytics parameters. Use synthetic fixtures and retain a small failure report identifying the processing stage and policy version, rather than copying whole lead payloads into a debug file.

Roll out new keys without inventing better lead counts

Compare the old and proposed policies on an authorized, scoped sample. Review collisions before changing any merge behavior. A stable record identifier should remain separate from a text-derived match key. If the policy changes, version the derivative and preserve enough provenance to explain previous decisions.

For submission trends, the free Svetlik Analytics for Contact Form 7 provides a documented dashboard. CF7 Analytics is our product; this article does not claim it performs Unicode entity matching. Report submissions and reviewed duplicate decisions as separate measures until the integration can support a defensible relationship.