I want to insert • into GtkTextView widget. In Python + pyGTK this line was sufficient:
self.__textBuffer.insert_at_cursor(u'\u2022')
Because I’m rewriting my application to C i need to translate this line of code.
I was trying to do:
gtk_text_buffer_insert_at_cursor(textBuffer, "\x20\x22", 2);
But it not worked, only inserted 2 chars"*.
How can I translate u’\u2022′ from Python to C?
You need to UTF-8 encode it, since GTK+’s encoding is UTF-8.
Thus:
You can see the UTF-8 encoding of this character here, for instance.