Why Claude Code Inserts Invisible Unicode Markers into Your Code
The author discovers that Claude Code (versions 2.1.91‑2.1.196) silently embeds three distinct Unicode characters as covert tracking tags, alters date formats, and inflates file size, and provides a simple script to detect and remove these hidden markers.
Hidden Unicode markers inserted by Claude Code
When Claude Code generates Python code, the apostrophe character that appears visually identical to the ASCII apostrophe (U+0027) can actually be one of three different Unicode code points:
U+2019 – right single quotation mark, UTF‑8 bytes e2 80 99 (three bytes).
U+02BC – modifier letter apostrophe, UTF‑8 bytes ca bc (two bytes).
U+02B9 – modifier letter prime, UTF‑8 bytes ca b9 (two bytes).
The plain ASCII apostrophe is U+0027, encoded as 27 (one byte).
Semantic flags encoded in the markers
U+2019 appears only when Claude Code has detected the user’s timezone (e.g., Asia/Shanghai).
U+02BC appears only when the prompt contains a tracked domain keyword.
U+02B9 appears when both timezone and domain‑keyword conditions are met.
U+0027 indicates no hidden flag.
Tracked domain keywords
The script identified 41 keywords that trigger the domain flag, including alibaba, aliyun, bytedance, douyin, baidu, tencent, moonshot, kimi, minimax, deepseek, qwen, and others.
Additional covert modification
Claude Code also rewrites dates from the ISO‑8601 form 2026-07-24 (hyphen‑separated) to a slash‑separated form 2026/07/24, which can be used to infer the user’s locale settings.
Impact on file size
Each hidden character occupies two or three bytes instead of one, so a codebase can grow by several bytes per occurrence. In a short test passage the author counted an increase of more than ten bytes when the hidden markers were present.
Detection script
def find_hidden_markers(path):
markers = {0x2019, 0x02BC, 0x02B9}
with open(path, 'r', encoding='utf-8') as f:
for lineno, line in enumerate(f, 1):
for col, ch in enumerate(line):
if ord(ch) in markers:
print(f"{path}:{lineno}:{col+1} → U+{ord(ch):04X}")The script reads each file, iterates over characters, checks the Unicode code point against the set {U+2019, U+02BC, U+02B9}, and reports the location together with surrounding context.
Version range and official assessment
The hidden‑marker behavior is present in Claude Code versions 2.1.91 through 2.1.196. The Chinese Ministry of Industry and Information Technology has classified this functionality as “severely harmful”.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
IT Xianyu
We share common IT technologies (Java, Web, SQL, etc.) and practical applications of emerging software development techniques. New articles are posted daily. Follow IT Xianyu to stay ahead in tech. The IT Xianyu series is being regularly updated.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
