Update legacy handling of unicode