Emacs' strings types handle Unicode well: you get 'multibyte' strings for non-ASCII data. Rust type analogy:
miniblog.
Related Posts
I had a third attempt at porting difftastic from Dijkstra to A*, and I've eventually concluded that A* just isn't worth it for the implementation complexity.
I had fun writing it up though, and I've even attempted ASCII art for building intuitions:
Today I learnt that null bytes are valid in UTF-8 and ASCII strings!
It was a surprise -- \0 doesn't feel like text -- but it'd be even more awkward when using C-style strings.
Today I learnt that Emacs will do a best-effort parse of expressions in comments too, unless you set parse-sexp-ignore-comments.
That's all well and good until org.el has ASCII smileys! https://github.com/bzg/org-mode/blob/4d8d7d6cb42e388572b4f5d227e9b3c9da6ca4a7/lisp/org.el#L4815-L4816 ("unbalanced paren")