Here is how I open, read and output. The file is an UTF-8 encoded file for unicode characters. I want to print the first 10 UTF-8 characters, but the output from below code
To output a Unicode string to a file or to the console you need to choose a text encoding. In Python the default text encoding is ASCII, but to support other characters you need to use a different encoding, such as UTF-8: