A Better UTF-8 Automaton

35 points by eatonphil


christine

The use of SAT solvers to produce DFA lookup tables is interesting.

hsivonen

I haven't benchmarked this, but I'm a bit skeptical of using a lookup table for parts other than validating the combination of first and second byte in three-byte or four-byte UTF-8 sequence. My utf8_iter crate does that. (Smaller lookup table. Like here, the table read by second byte does not depend on the table read by first byte.)