Re: UTF-8 error in GtkTextView while decoding base64

2014-04-15 Thread David Nečas
On Mon, Apr 14, 2014 at 02:22:00PM -0400, a wrote: > const Glib::ustring str = Glib::Base64::decode("YmJi3A=="); YmJi3A== represents the four bytes 0x62 0x62 0x62 0xdc. This is not valid UTF-8. So, you get an assertion error because you must pass valid UTF-8 to essentially all Gtk+ function.

UTF-8 error in GtkTextView while decoding base64

2014-04-14 Thread a
Hi, I have been trying to figure this out for a few days now. All I am trying to do is decode a base64 string and add it to a Gtk::TextView. Below is the code: txtbuffer_ = Gtk::TextBuffer::create(); txtview_.set_buffer(txtbuffer_); const Glib::ustring str = Glib::Base64::decode("YmJi3