I recently ran into [Unicode history does not work very well in pyrepl](https://foss.heptapod.net/pypy/pypy/-/issues/2371) in PyPy and investigated it a bit. I've got a ~~proof of concept~~ patch (based on the vendored version from PyPy) here: https://github.com/obfusk/pyrepl-wide ~~It doesn't handle wrapped lines and a few other cases (yet), but it does work quite well otherwise.~~ It seems to work quite well :smile: Based on a quick look at a diff it seems that the PyPy version doesn't differ much (or in ways not relevant to this). I'd appreciate some input from someone more familiar with the original code.