Re: [gtkmm] converting iso-8859-1 to Glib::ustring
- From: joey yandle <joey divisionbyzero com>
- To: Barnaby Gray <bee pickle me uk>
- Cc: gtkmm list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] converting iso-8859-1 to Glib::ustring
- Date: Wed, 2 Jul 2003 17:43:30 -0400 (EDT)
>
> What does:
> std::string charset;
> bool utf8 = Glib::get_charset(charset);
> std::cout << charset << ( utf8 ? " (utf8) : "") << std::endl;
>
> output?
>
Nothing... get_charset returns false.
>
> Have you tried:
> Glib::convert(iso, "UTF-8", "ISO-8859-1");
>
Ah, that's it:
Glib::ustring clean (Glib::convert(s, "UTF-8", "ISO-8859-1"));
doesn't throw(), and the resulting ustring displays in gtkmm.
thanks,
--
joey yandle ___====-_ _-====___
www.divisionbyzero.com _--~~~#####// \\#####~~~--_
/jwy/pubkey.asc _-~##########// ( ) \\##########~-_
-############// :\^^/: \\############-
_~############// (@::@) \\############~_
~#############(( \\// ))#############~
-###############\\ (^^) //###############-
-#################\\ / "" \ //#################-
-###################\\/ \//###################-
_#/:##########/\######( /\ )######/\##########:\#_
:/ :#/\#/\#/\/ \#/\##\ : : /##/\#/ \/\#/\#/\#: \:
" :/ V V " V \#\: : : :/#/ V " V V \: "
" " " " \ : : : : / " " " "
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]