Re: [Nautilus-list] i18n for web page titles



Ramiro Estrugo wrote:

Havoc Pennington wrote:

Hi,

See:

 http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=51709

I think the Mozilla component gives a UTF-8 window title, but we need
to gtk_window_set_title() with current locale's encoding.

So we need g_utf8_to_locale() in stable Nautilus. This is easy if we
can use unportable Linux features. :-/ Making it work cross-platform
probably involves libiconv.

Seems like sort of a huge pain for a tiny bug.

Any thoughts?

Havoc



I think you spelled out the solution.

#ifdef HAVE_WORKING_UTF8_TO_LOCALE_CONVERSION
/*convert*/
#else
/*you lose*/
#endif

Non Linux users are going to bitch and whine as always.

I dont think it is worth any greater effort to properly fix this, since
presumably this problem will go away when Gtk+2 comes to town.
-re


Here's what I just put in the bug:

Woops. That's not UTF-8. I didn't realize that we were talking about Nautilus. I thought we were talking about Mozilla.

The string that's passed back to Nautilus through gtk_moz_embed_get_title()isn't UTF-8. In fact, it's probably converted to a C-string by chopping off thehigh bits. You need to use gtk_moz_embed_get_title_unichar() instead. Thiswill hand you back Mozilla's internal UTF-16-like encoded string. You can use one of the conversion functions to get a UTF-8 encoded string from that and then
you can convert it to the locale-specific encoding.

You can also throw the UTF-8 encoded string up using the new-style _NET* Xproperties, assuming the wm supports it.

--Chris

--
------------
Christopher Blizzard
http://people.redhat.com/blizzard/
------------





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