improved unicode handling