liveBook · Manning

Zero-width character

As explained in AI Governance

A zero-width character is a Unicode character that occupies no visible horizontal space when rendered.

Zero-width characters occupy no visible horizontal space when rendered. In AI configuration files, flag them as non-printable Unicode that may have no legitimate purpose in plain text. section 4.5.1

Apply these safeguards to AI configuration files:

  • Use regex checks in an editor or CI pipeline to flag non-printable Unicode. section 4.5.1
  • Strip non-printable characters from external configuration files with tools such as cat -v, sed, or a Unicode sanitizer. section 4.5.1
  • Require security-aware review for changes to agent instructions; use CODEOWNERS or an equivalent to require internal approval of outside contributions. section 4.5.1

How AI Governance covers it

How deep it goes
Recommends detection and sanitization, but does not provide regex patterns or Unicode implementation details.
Examples
Names .cursorrules, .github/copilot-instructions.md, and AGENTS.md, and recommends cat -v, sed, or Unicode sanitizers.
What you can do after
Operate editor or CI checks to flag non-printable Unicode and sanitize external configuration files.
How it connects
Connects zero-width characters to AI configuration files, agent instructions, and prompt injection risk.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Governance. The section links point to the parts of the book it draws on.