Re: [gtkmm] converting iso-8859-1 to Glib::ustring



> 
> 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]