Greatly improved unicode handling