Re: [gtkmm] Glib::ustring problems



Am Son, 2002-10-13 um 08.51 schrieb Tapan S. Parikh:
> 
> Having some problems with Glib::ustring in gtkmm2...
> 
> It seems I cannot print some strings until I run the function .c_str()
> on them when working in a locale with charset = UTF-8.  The following
> code works (in each case t is initialized from a string constant).
> 
> cout << t.c_str() << endl;
> 
> as does this:
> 
> cout << t.c_str() << endl
> cout << t << endl;

This one I don't fully understand.  If there's really no semicolon after
the 1st endl, you're outputting a pointer to the stream...

> but the following by itself doesn't
> 
> cout << t << endl;
> 
> I get the following error:
> (hisaab:24296): glibmm-CRITICAL **: 
> unhandled exception (type Glib::Error) in signal handler:
> domain: g_convert_error
> code  : 1
> what  : ¿¢¨à áü¢Ã¢ý ¯ûãÃ
>                                      ø ºÃ¢Ãü ¨Ãð Ã⨺èÃ

code 1 is ILLEGAL_SEQUENCE.  Are you sure the string is valid UTF-8? 
Could you give us the literal you're using (maybe in an attachment to
make sure it won't be mangled)?

--Daniel





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]