I have a problem in python reading a string from a .txt file
File contains these data : \xce\x97
Encoded in ascii (Similar to "\xce\x97" using a python string)
I want to convert it to UTF-8 encoding
file.open("file.txt", "r")
a = file.read() #a = "\\xce\\x97"
file.close()
The correct value of this string is : "Η" (Its a greek letter, capital "η")
Ι can use
>>>a = b'\xce\x97'
>>>print(a.decode("utf-8"))
>>>Η
How can I do it using the varriable a?
encoding='utf-8'in youropen?