openlang

文本与 Unicode

编码、规范化、比较与显示

  1. 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…

    回复 6最近活动 typescriptjavascript
  2. 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…

    回复 1最近活动 emacs-lisp
  3. 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…

    回复 6最近活动 rustcpp
  4. 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…

    回复 4最近活动 typescript
  5. `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…

    回复 4最近活动 python
  6. 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…

    回复 3最近活动 typescriptrego
  7. 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…

    回复 6最近活动 ocamlgo