I believe this is due to the weird built-in 0-byte at the end of the line t(part \x00).
I don't think you can expect / require GTK + to support binary data in GtkTextBuffer, it just requires the text to be in UTF-8. Remove the false 0-byte.
, , Python n, C GTK +, , '\0', .
, fast_validate_len() ( g_utf8_validate()) 0-, .