Re: glibmm exceptions broken after recent upgrades on CURRENT (debug info included)

From: Ted Faber <faber_at_ISI.EDU>
Date: Thu, 31 May 2007 14:32:13 -0700
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

Received on Thu May 31 2007 - 19:32:41 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:11 UTC