On Thu, May 31, 2007 at 01:34:30PM -0700, Ted Faber wrote: > I've attached a short example that exhibits the problem and a dump of > the stack trace from gdb. All this is a pretty recent -CURRENT and new > ports. The example code doesn't seem to have made it. Sorry, it's here. #include <iostream> #include <string> #include <glibmm.h> using namespace std; int main(int argc, char **argv) { string s; char ss[2] = { static_cast<char>(0xe9), static_cast<char>(0x00) }; setlocale(LC_ALL, "en_US.UTF-8"); Glib::init(); Glib::get_charset(s); cout << s << endl; cout << ss << endl; try { Glib::ustring us = Glib::locale_to_utf8(ss); cout << us << endl; } catch (Glib::ConvertError &ge) { cerr << "error" << endl; } catch (Glib::Error &ge) { cerr << "error" << endl; } } -- Ted Faber http://www.isi.edu/~faber PGP: http://www.isi.edu/~faber/pubkeys.asc Unexpected attachment on this mail? See http://www.isi.edu/~faber/FAQ.html#SIG
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:11 UTC