Can't use feed_child() from python3
vte_terminal_feed_child() is declared as type
element-type gchar. This results in this weird situation:
Although I expected to pass it an object of type
str (i.e. Unicode string in Python 3), that's not what it takes. Instead it takes an object of type
bytes (uninterpreted sequence of 0..255 values).
However, due to a difference in signedness, passing a
bytes object representing a non-ASCII string, where VTE expects a
gchar, gives such an error:
OverflowError: Item 1: 195 not in range -128 to 127
Is this a bug (or, well, a pretty unfortunate limitation) in the glib <-> python3 binding?
Can we change that
guint8 to silently fix it, without breaking anything?
Or can we and should we even fix it to take a Unicode string (and then
vte_terminal_feed() too?), which breaks existing Python scripts? Probably not.
(A workaround is to manually (re)encode the string using the terminal's encoding (not necessarily UTF-8), and then pass to