text.txt
file includes letters like "ğ", "ü", "ş",(these are Turkish letters). When I print the content, the result is ���
Here is my code in python:
# -*- coding: utf-8 -*-
with open("text.txt") as file:
contents=file.read()
print(contents)
output:
���
How can I solve this problem? Please let me know and thanks for your time.
I tried different encodes, utf-8, windows1254, etc. I tried firstly to decode and then encode but the letters were deleted. I think the problem is about VSCode because when I used PyCharm, it is OK. Turkish characters are not problem.
Additionally; i tried "monospace" font, it didn't work
when i tried; 'with open("text.txt", encoding="utf-8") as file:' it gives an error: 'UnicodeDecodeError: 'utf-8' codec can't decode byte 0xfc in position 25: invalid start byte'