The title is written like that, but I think I haven't found the right solution.
The original file is a text file containing old Hangul, but even if you save it with all Unicode storage options, such as Unicode, utf-16, and utf-8, it will not open in Python. (First of all, I have tried all the forms of pages that appear when I search for standard encoding on Google, such as utf-16 and utf-16-le on Python.)
The error message is UnicodeEncodeError: 'UCS-2' code can't code characters in position 28623-28623: Non-BMP character not supported in Tk'.
When I googled, there are people who wrote that using a program like Faicham opens, but this solution cannot be applied because I have to use only the default Python editor. What's the problem?
python
First of all, the problem seems to be that it does not support 4-byte utf8 characters.
Is it done in Windows cmd? Try it on a shell that supports utf8 instead of cmd.
If you need to do it in cmd, do it in the cmd state, that is, on the prompt, as shown below.
chcp 65001
Then run the Python file
573 GDB gets version error when attempting to debug with the Presense SDK (IDE)
570 Uncaught (inpromise) Error on Electron: An object could not be cloned
805 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
561 Understanding How to Configure Google API Key
556 Who developed the "avformat-59.dll" that comes with FFmpeg?
© 2024 OneMinuteCode. All rights reserved.