惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
T
Threatpost
阮一峰的网络日志
阮一峰的网络日志
美团技术团队
F
Fortinet All Blogs
The GitHub Blog
The GitHub Blog
月光博客
月光博客
V
Visual Studio Blog
T
Tailwind CSS Blog
Stack Overflow Blog
Stack Overflow Blog
博客园 - 聂微东
Jina AI
Jina AI
J
Java Code Geeks
Martin Fowler
Martin Fowler
大猫的无限游戏
大猫的无限游戏
Recorded Future
Recorded Future
C
Check Point Blog
腾讯CDC
N
Netflix TechBlog - Medium
aimingoo的专栏
aimingoo的专栏
罗磊的独立博客
Hacker News: Ask HN
Hacker News: Ask HN
SecWiki News
SecWiki News
博客园 - Franky
Hacker News - Newest:
Hacker News - Newest: "LLM"
N
News | PayPal Newsroom
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
S
Security @ Cisco Blogs
W
WeLiveSecurity
The Last Watchdog
The Last Watchdog
Cloudbric
Cloudbric
F
Full Disclosure
The Cloudflare Blog
Y
Y Combinator Blog
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
S
Schneier on Security
Schneier on Security
Schneier on Security
Spread Privacy
Spread Privacy
L
LINUX DO - 热门话题
AI
AI
N
News and Events Feed by Topic
T
Tor Project blog
P
Palo Alto Networks Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog

WishMeLz - JS

Electron 主进程起一个可用的 HTTPS 静态服务器 - WishMeLz 某x面板每月自动重置流量功能 - WishMeLz ANSI 字体在前端展示 Jenkins日志 - WishMeLz 获取视频某一秒的截图 - WishMeLz 金额大写 - WishMeLz markdown 编辑器 md编辑器 - WishMeLz SSE(Server-Sent Events) - WishMeLz 随机渐变背景 - WishMeLz 文件处理 - WishMeLz
零宽非连接符 [ZWNJ] U+200C - WishMeLz
WishMeLz · 2026-06-01 · via WishMeLz - JS
今天发现一个问题,12位长度的字符串,length居然有14位
102791017246‌‌

2025-05-15T02:19:51.png

2025-05-15T02:24:31.png

encodeIRL试试看

encodeURI(str)
'102791017246%E2%80%8C%E2%80%8C'
for (let i = 0; i < str.length; i++) {
    console.log(`位置 ${i}: '${str[i]}' - Unicode: ${str.charCodeAt(i)}`);
}

2025-05-15T02:21:21.png

打印看看

function visualizeInvisibleChars(str) {
    return str
        .replace(/\u200C/g, '[ZWNJ]')  // 零宽非连接符
        .replace(/\u200D/g, '[ZWJ]')   // 零宽连接符
        .replace(/\u200B/g, '[ZWSP]')  // 零宽空格
        .replace(/\u00A0/g, '[NBSP]'); // 非断行空格
}
console.log(visualizeInvisibleChars(str));
102791017246[ZWNJ][ZWNJ]

清理方法

移除所有零宽字符
function cleanString(str) {
    return str
        .replace(/[\u200B-\u200D\uFEFF]/g, '') // 移除零宽字符
        .replace(/\s+/g, ' ')                  // 规范化空白字符
        .trim();
}

最后编辑时间为: May 15th , 2025 at 10:24 am
本文由 Wish 创作,采用 知识共享署名 4.0 国际许可协议进行许可
可自由转载、引用,但需署名作者且注明文章出处

标签 : 无标签