Update tests and code to identify 4 states: NODI, RTL, LTR & BIDI, and deal with numbers correctly