At the present time I'm doing it like:
GtkTextBuffer *buf = gtk_text_view_get_buffer(...);
gtk_text_buffer_get_bounds(buf, &start, &end);
gchar *data = gtk_text_buffer_get_text(buf, &start, &end, true);
gint size = strlen(data); // ouch
But this is rather ugly. I found (and tested) gtk_text_iter_get_offset()
but it returns the size in characters, not physical bytes.