refine string/unicode handling