Thanks @mentalstring, I used your PR as an inspiration for
Which also includes some performances and better non-latin-locales handling
(cc @lindsey)