unicode: fix unicode encode bug