Strings Are Lying to You: Unicode Length, Case and Normalization in PHP, Python and JavaScript
- Created
- 1 Dec 2026
- Last reply
- about 3 hours ago
- Replies
- 0
- Views
- 0
- Reactions
- 0
Discussion of the blog article Strings Are Lying to You: Unicode Length, Case and Normalization in PHP, Python and JavaScript.
One family emoji is 18 bytes, 8 JavaScript code units, 5 Python characters and 1 thing a human sees. I ran the same Unicode tests through PHP 8.6, Python 3.15 and Node 26: each gave a different answer for length, case and truncation, a KELVIN SIGN lowercases into a real username, and PHP 8.6's...
Discussion thread — share findings, corrections and follow-ups below.