I can't add more than (something like) 2000 chars in a GtkEntry. What's wrong?

There is now a known problem in the GtkEntry widget. In the gtk_entry_insert_text() function, the following lines limit the number of chars in the entry to 2047.

  /* The algorithms here will work as long as, the text size (a
   * multiple of 2), fits into a guint16 but we specify a shorter
   * maximum length so that if the user pastes a very long text, there
   * is not a long hang from the slow X_LOCALE functions.  */

  if (entry->text_max_length == 0)
    max_length = 2047;
  else
    max_length = MIN (2047, entry->text_max_length);