lemi57ssss
lemi57ssss

Reputation: 1380

Can tkinter be used for languages without an upper/lower case distinction?

It is an error to give a tkinter widget a name which begins with an upper case character as in:

b = ttk.Button(self, name='OK')

What happens in languages which do not have a distinction between upper and lower case such as logogrammatical languages? Presumably tkinter flags the upper case as an error because it would create some kind of internal problem.

If this has been resolved for non Latin languages there would be no point in retaining the error for Latin languages. If it has not been resolved then tkinter has a bug when non Latin languages are used.

My fear is that choosing tkinter, tk, and ttl will mean that my program may not work in any language other than those which use a Roman alphabet.

Upvotes: 0

Views: 515

Answers (1)

Bryan Oakley
Bryan Oakley

Reputation: 385950

Tkinter uses tcl/tk as the underlying technology to render widgets. In Tcl/tk, all strings are unicode strings. When determining whether a character is uppercase or lowercase it looks at the unicode attributes of those characters. If the unicode standard says a character is lowercase, that character is allowed as the first character of a widget name.

Upvotes: 1

Related Questions