当我尝试在textbuffer TextView中插入ñ时,CMD会显示以下错误:
(textEditor.exe:696):Gtk-CRITICAL **: gtk_text_buffer_emit_insert:断言 g_utf8_validate(text,len,NULL)' 失败
源代码示例(c ++和gtkmm):
Glib::RefPtr<Gtk::TextBuffer> refTextBuffer = textView->get_buffer();
refTextBuffer->set_text("\xA4"); //hex ASCII
refTextBuffer->insert_at_cursor("ñ");