Re: Pango warning: "Invalid UTF-8 string"



On Mon, 2005-07-18 at 10:28 +0200, Matthias Kaeppler wrote:
> Murray Cumming wrote:
> > No, it's called Glib::filename_to_utf8():
> > http://www.gtkmm.org/docs/glibmm-2.4/docs/reference/html/group__CharsetConv.html#ga7
> > 
> > though it might sometimes be the same thing.
> 
> I also tried this function but it didn't work. The error was still 
> there. Not so with locale_to_utf8().
> 
> What is filename_to_utf8() supposed to do? What is special about a 
> filename what other strings don't have (considering that characters like 
> slashes can as well be part of a normal character sequence) and why 
> would it fail where locale_to_utf8() works?
> 
> The filenames I'm displaying don't contain any slashes by the way. It's 
> just the leafs of the paths I'm displaying (e.g. instead of 
> "/usr/local/share" I'm displaying "share").

If you are getting the filename from the FileChooser, the "Note:" here
might be helpful:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1FileChooser.html

std::string -> ustring involves an automatic encoding conversion, so
that might be confusing things.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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