Tutorials

Claude Opus 5.5: Audit Unicode Filename Collisions Before Asset Delivery

Ask Claude Opus 5.5 to compare raw asset names with normalized comparison keys before proposing any rename.

Fictional product · ad example

Make it with Panelly

Turn inspiration into your next product ad

Bring a product image and an idea. Create a four-panel ad, a coordinated asset set, or a video with Panelly.

Create with Panelly Edit the brief before you generate.
AI editorial concept: three stacks of cream bottle campaign prints with blue, terracotta and green tabs beside a folder and blank checklist.

Ask Claude Opus 5.5 to compare raw asset names with normalized comparison keys before proposing any rename. Two names can look identical while containing different Unicode sequences. Preserve the original path and a stable asset ID; a shared normalized name is a collision to investigate, not permission to delete a file.

Recognize a character problem, not a naming-template problem

A 2017 developer report describes NFC/NFD filename behavior on a cloud-backed filesystem. It is a historical environment-specific report. Do not generalize it into “all Macs rewrite names” or assume a ZIP recipient has the same filesystem behavior.

The Unicode normalization FAQ distinguishes canonical normalization from compatibility normalization. NFC and NFD can represent canonically equivalent text differently. NFKC can also collapse compatibility distinctions; it is not a harmless default for brand identifiers. JavaScript's String.normalize documentation provides an explicit comparison operation.

FieldKeep or computePurpose
Asset ID and raw relative pathKeep unchangedFind the exact source
NFC comparison keyCompute separatelyGroup canonically equivalent names
Actual content hashCompute from bytesDistinguish content, not appearance
Destination policyDocument separatelyApply case and filesystem constraints

Work through two visually identical names

In the example below, the first name uses one precomposed é; the second uses e plus a combining acute accent. They contain 8 and 9 Unicode code points respectively, and occupy 9 and 10 UTF-8 bytes. These are calculations for the example strings, not universal filename-length rules.

const names = ['caf\u00e9.png', 'cafe\u0301.png'];
const rows = names.map(raw => ({
  raw,
  codePoints: [...raw].length,
  utf8Bytes: new TextEncoder().encode(raw).length,
  nfcKey: raw.normalize('NFC')
}));
console.table(rows);

Both NFC keys match. If actual file hashes differ, retain both assets and resolve which approved revision each represents. Even equal hashes only establish byte equality; two campaign records may intentionally reference the same pixels. A comparison key should not silently replace a storage key, public URL or display name. Case-insensitive destination checks are another policy, separate from Unicode normalization.

A complete read-only audit prompt

Audit the supplied asset inventory without renaming, deleting, overwriting or uploading anything. Inputs must include stable asset ID, raw relative path and an actual byte hash where available. Do not invent hashes.
Add an NFC comparison key while preserving the raw string. Report canonical-equivalence groups separately from case-policy conflicts and exact duplicate paths. Do not use NFKC or lowercase conversion to rewrite brand names or identifiers.
For each collision, list IDs, raw strings with escaped code points, available hashes, approval records and the unresolved decision. Matching normalized names do not imply matching content. Matching hashes do not authorize deleting campaign references.
Return a proposed destination manifest only after conflicts are resolved. Preserve existing public URLs unless a separate migration is approved. For an approved copy operation into a new directory, verify source/destination counts and byte hashes, then unpack a test archive on the intended recipient environment. Report untested environments explicitly.

This is a proposed use of Opus with explicit scope, following the official prompting guide. The string example was computed locally; no real asset rename, recipient archive test or Opus run is claimed.

Keep comparison and migration separate

Start with a report containing two rows for the two sources, even when there is only one NFC group. Resolve approval and destination conflicts before copying. Test a small archive containing the exact problematic names; a clean preview in your own file manager does not prove the receiving workflow preserves them. If an existing web URL must change, treat redirects, references and cache behavior as a separate migration task.

**Should I strip all accents?** That changes names and can create new collisions. Use stable IDs when a delivery system needs restricted filenames.

**Does NFC solve every filename conflict?** No. Case handling, reserved names, path length and permissions remain destination-specific checks.

Export approved images from Panelly Studio and bind them to the inventory. The ad-asset naming workflow explains readable campaign fields; this audit addresses the underlying character sequences. Neither workflow assumes Panelly integrates Opus.

Sources and further reading

Four panels. One ad.

Your next ad starts here.

Describe your product, its benefits and its audience. Create a four-panel ad with Panelly.

Start creating ↗View credit packs