Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · DESTINATION TEST

Why does the cleaned B appear at buffer offset three rather than string index two?

For éAB, Buffer.indexOf returns 3 while string indexOf returns 2.

Tested 5 November 2026 · Synthetic fixtures · Minimal DOM

What the test establishes

The accented letter occupies two UTF-8 bytes but one UTF-16 code unit in this fixture. The two search results therefore use different coordinate systems. A destination that stores a byte offset must not consume a string index without conversion. Record the encoded prefix length when constructing byte-level annotations and compare against the exact exported encoding. The synthetic marker has already disappeared before either search runs. The difference remains because encoding changes the unit used for positions. Both searches find the same visible letter, so treating the discrepancy as failed cleanup would send debugging toward the wrong stage.

Reproduce the observation

Save tested-app.js and reproduce.cjs together, then run node reproduce.cjs. Compare its output with the recorded observation. The harness executes the actual homepage callback in a minimal DOM and records its resulting field values and method calls. Destination operations run in Node.js; the homepage DOM is a controlled substitute. Runtime: v24.22.1. No submitted text or genuine Claude output is used.

{
  "text": "éAB",
  "bytes": [
    195,
    169,
    65,
    66
  ],
  "stringIndex": 2,
  "byteIndex": 3
}

Capability boundary

One BMP accented character is measured. Missing needles, emoji and alternate encodings are excluded.

This Claude watermark remover edits a small selected character set. These callback observations do not establish authorship, detector scores, statistical-watermark removal or end-to-end browser behavior. For real work, keep the original and compare the exact result at its destination.

Primary material and next step

The tested first-party source snapshot and complete harness are the primary material for this page. For broader scope, read invisible Unicode versus AI watermarks, or return to the cleaner.