APK errors

Excel breaks the letter ə

Excel can open a UTF-8 file that has no BOM with the system table. On Azerbaijani Windows that table is the Turkish one, cp1254. It has ü, ö, ş, ğ, ç, and ı. It does not have ə. The letter becomes ? or another mark.

utf-8 is right for other programs. It is not enough for Excel. utf-8-sig puts three bytes at the start, and Excel reads the file as UTF-8.

Do not change everything at once. Check the cause in order.

This is not the square in the console. If the letter is a square there, do not change the code. Change the font.

with open("metn.csv", "w", newline="", encoding="utf-8-sig") as fayl:
    fayl.write("ad\nAzərbaycan\n")