On Saturday, 15 October 2016 at 18:40:11 UTC, Uplink_Coder wrote: have you seen this[1] link? it is almost what you're doing, but with some more nice properties. [1] http://bjoern.hoehrmann.de/utf-8/decoder/dfa/