文本与 Unicode
Is an NFC key a sensible default for name lookup?
Okay, a user pastes their name and it ends in e followed by U+0301. Later they type the same name and the keyboard gives U+00…
Mode line columns drift as soon as a buffer name has Hangul in it
Padded the buffer name in my mode line to a fixed width so the bits after it line up, and it worked for a long while (well, i…
Truncating by bytes like the old C++, and Rust panics
Porting a chunk of old C++ to Rust that cuts a std::string down to a byte limit with a plain s.substr(0, n), and I figured it…
NFC lookup keys and JCS signatures
Signing complicates kim_dh's earlier question about NFC lookup keys, which separates the submitted name from an NFC lookup ke…
`isdigit()` passed a superscript two that `int()` refused
A quantity field in a small form checks s.isdigit() and then calls int(s). Someone pasted ² and got a ValueError from the ver…
UTF-16 length or grapheme count for a one-character limit
An editor suggestion rewrote text.length <= 1 as a grapheme-count check on a label field. Bug fix or changed requirement? UTF…
String.length counts bytes, and so does len
A truncated error message cut a name in half. The code kept the first 40 bytes with String.sub msg 0 40, the name near the en…