fix receiving non-Unicode input