When the user inserts non-English characters, the script stops with an error.
# -*- coding: utf-8 -*-
from Tkinter import *
wnd = Tk()
name_A = Entry(wnd)
name_A.pack()
def AAAA1():
A1 = name_A.get()
with open("file_name.TXT", 'w') as f:
f.write(A1)
Button(wnd, text="GO", command=AAAA1).pack()
wnd.mainloop()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd7 in position 0: ordinal not in range(128