<commit_before>import gtk

from kiwi.ui.widgets.entry import Entry

entry = Entry()
entry.set_completion_strings(['apa', 'apapa', 'apbla',
                              'apppa', 'aaspa'])

win = gtk.Window()
win.connect('delete-event', gtk.main_quit)
win.add(entry)
win.show_all()

gtk.main()<commit_msg>Extend example to include non-ASCII characters<commit_after># encoding: iso-8859-1
import gtk

from kiwi.ui.widgets.entry import Entry

def on_entry_activate(entry):
    print 'You selected:', entry.get_text().encode('latin1')
    gtk.main_quit()

entry = Entry()
entry.connect('activate', on_entry_activate)
entry.set_completion_strings(['<NAME>',
                              u'<NAME>',
                              u'<NAME>',
                              u'Bstad',
                              u'rnskldsvik',
                              'sanca',
                              'sampa'])

win = gtk.Window()
win.connect('delete-event', gtk.main_quit)
win.add(entry)
win.show_all()

gtk.main()
{'fraction_non_alphanumeric': 0.13858424725822532, 'fraction_numerical': 0.005982053838484547, 'mean_word_length': 2.157232704402516, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5411138', 'n_tokens_mistral': 329, 'n_tokens_neox': 314, 'n_words': 58}