Fixed the crash issue when inputting chinese

Fixed the crash issue when inputting chinese