From fc149f8e71eecdf87f5eacebf154101c03ffcfa0 Mon Sep 17 00:00:00 2001 From: AD Date: Wed, 8 Aug 2018 16:25:05 +0200 Subject: [PATCH] Fixed multiple character emoji tcl exception handling --- tagmaps/__main__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tagmaps/__main__.py b/tagmaps/__main__.py index e961d21..4a371f8 100644 --- a/tagmaps/__main__.py +++ b/tagmaps/__main__.py @@ -977,6 +977,7 @@ def is_number(s): overallNumOfUsersPerTag_global.update(taghash) global topTagsList + print_store_log(f"Total unique tags: {len(overallNumOfUsersPerTag_global)}") topTagsList = overallNumOfUsersPerTag_global.most_common(tmax) #remove all tags that are used by less than x {limitBottomUserCount} photographers if removeLongTail is True: @@ -1496,7 +1497,8 @@ def delete(listbox): try: listbox.insert(tk.END, f'{item[0]} ({item[1]} user)') except tk.TclError: - emoji = unicode_name(item[0]) #Utils.with_surrogates() + #print(item[0].encode("utf-8")) + emoji = "".join(unicode_name(c) for c in item[0]) #Utils.with_surrogates() listbox.insert(tk.END, f'{emoji} ({item[1]} user)') canvas.pack(fill='both',padx=0, pady=0) listboxFrame.pack(fill='both',padx=0, pady=0)