- tf->max_delimiters = 0;
- GtkTreeIter iter;
- gboolean valid;
- for (valid = gtk_tree_model_get_iter_first (tf->child, &iter);
- valid;
- valid = gtk_tree_model_iter_next (tf->child, &iter))
- {
- // FIXME: Box these lines to avoid constant allocation/deallocation
- gchar *foo = 0;
- gtk_tree_model_get (tf->child, &iter, 1, &foo, -1);
+ gint enc = -1;
+ // FIXME: Box these lines to avoid constant allocation/deallocation
+ gchar *line = NULL;
+ gtk_tree_model_get (tf->child, &iter, 1, &line, -1);
+ {
+ char *p;
+ gint count = 0;
+ for (p = line; ; p = g_utf8_find_next_char (p, NULL))