Added proper Unicode input handling