I designed an Interface in Python Which I want to use as a project relating to Natural Language Processing. But When ever I try to write any Bangla Language word in the Input Field It shows Question Mark "????", How can I fix it?
Here is the Interface Code:
from tkinter import *
def show_entry_fields():
#This Line is Printing The Scanned String
print("First Sentence: %s\nSecond Sentence: %s\nThird Sentence: %s" % (e1.get(), e2.get(),e3.get()))
#Below This Line Is Interface Coding I think
e1.delete(0,END)
e2.delete(0,END)
e3.delete(0,END)
master = Tk()
Label(master, text="First Sentence").grid(row=0)
Label(master, text="Second Sentence ").grid(row=1)
Label(master, text="Third Sentence").grid(row=2)
e1 = Entry(master)
e2 = Entry(master)
e3 = Entry(master)
e1.insert(20,"")
e2.insert(20,"")
e3.insert(20,"")
e1.grid(row=0, column=1, columnspan=2)
e2.grid(row=1, column=1, columnspan=2)
e3.grid(row=2, column=1, columnspan=2)
Button(master, text='Quit', command=master.quit).grid(row=5, column=0, sticky=W, pady=4)
Button(master, text='Show Similar Word', command=show_entry_fields).grid(row=5, column=1, sticky=W, pady=4)
mainloop( )
In image 1 English working Properly but when I start to use bangla in image 2, it prints "????" question marks.Both the Interface and Shell Prints same "????" question mark.I researched a bit and I think the solution Lies in "utf-8" encoding but I can't implement it in this interface.