2
import tkinter as tk
from tkinter import *

app = tk.Tk()
app.geometry("1000x1000")
app.title("Desktop Translation App")
label1 = tk.Label(app, text="Sentence to Translate")
label1.grid(row=1, column=0)
label2=tk.Label(app,text="Add Translation Here")
label2.grid(row=20,column=0)
entry2=Text(app,width=50 ,background='orange',font = "lucida 13")
entry2.place(x=100, y=115, height=50, width=800)
app.mainloop()

while typing Indian language text in text box, it shows question mark,please help to rectify the issue. so the program should render in Indian language.

Question mark in textbox of tkinter: enter image description here

kadamb
  • 1,532
  • 3
  • 29
  • 55

1 Answers1

0

Firstly declare your source file encoding:

# -*- coding: utf8 -*-

This must be either the first or second line in the file.

Secondly you need to ensure your editor is actually saving in that encoding

  • Tried # -*- coding: utf8 -*- but still ???? showing, In latest MAC without any encoding its showing indic charactes, but failed for windows. – nisha yadav Aug 12 '20 at 18:18