There is a function that reads a byte file. It is necessary to convert the file to UTF-8 encoding. I tried to use this code to read the file.
def readTags(filepath): with open(filepath, 'rb') as f: byte = f.read() print(byte) while byte: byte = f.read() try: print(byte.decode('utf-8')) except Exception as e: continue
But the bytes remain in the standard form, i.e.
\xd0\xa1\xd0\xbf\xd0\xb0\xd1\x81\xd0\xb8\xd0\xb1\xd0\xbe \xd0\xb7\xd0\xb0 \xd0\xbf\xd0\xbe\xd0\xbc\xd0\xbe\xd1\x89\xd1\x8c
How can I convert these bytes to a string?
print(byte)
withprint(byte.decode('utf-8'))
obvious - andreymal