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



On Sun, 2005-07-17 at 22:07 +0200, Matthias Kaeppler wrote:
> Roger Leigh wrote:
> >>It's a filename, an std::string returned by 
> >>Gnome::Vfs::FileInfo::get_name().
> > 
> > 
> > You want the glibmm equivalent of g_filename_to_utf8.
> 
> Sweet, that did the job. Thanks. It's called 
> Glib::locale_to_utf8().

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.

However, Gnome::Vfs::Uri::format_for_display(), in gnome-vfsmm 2.11/2.12
will obviously be even more suitable.

> > You might also want to consider using a UTF-8 locale (de_DE.UTF-8) and
> > UTF-8 filenames on disc.
> 
> I also considered that, but wasn't sure if I 
> really need it. What exactly would be the 
> advantage of using UTF-8 over an extended ASCII 
> charset?
> 
> I have the feeling that other programs may have 
> trouble with widebyte charsets (for example, if I 
> send UTF-8 encoded in X-Chat, people using MS 
> Windows can't read my umlauts either).

It depends on the encoding of the irc server. The irc client would have
to support several encodings. UTF8 is the only encoding that's likely to
allow full interoperability.

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