Port unicode fixes from Vim plugin.