refactor unicode tools