Handle pasting Chinese text issue and Chinese file name encoding issue on Windows.