ASCII vs Unicode 详解
Unicode 比 ASCII 多什么,用哪种编码,以及实际坑。
广告
广告
Tools in this guide
短答
ASCII = 128 字符(英文 + 控制字符)。Unicode = 154,000+ 字符(每种活的语言)。现代默认 UTF-8。
工具
- Unicode Inspector 看任何字符串的字节与码点
- Charset Fixer 修乱码文件
- Case Converter 处理跨脚本大小写
坑
- 屏幕宽度 ≠ 字节长度(emoji: 1 码点 = 4 UTF-8 字节)
- JS string.length 基于 UTF-16 code unit
- 编码默认值随工具链变化
信息
UTF-8 是 web 默认。优先 UTF-8 除非有 legacy 原因。
广告
使用方法
Open the tool
Open the relevant tool linked below in your browser. The page handles everything client-side.
常见问题
Does this upload my file?
No. All ToolConvoy tools process files in your browser; nothing is uploaded to a server.
广告