I rather like the fs.readFileSync API in node. It gives you a buffer, unless you specify a text encoding.
This gently encourages users to think about their encoding, without having a heavyweight unicode datatype.
I've released difftastic 0.21. A fairly small release, but some nice improvements:
* Supports Emacs -*- syntax as another hint for language detection (handy for dune files).
* Improved alignment heuristics (see screenshot)
* A bunch of Unicode fixes
https://crates.io/crates/difftastic