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

Ramiro Estrugo wrote:

Havoc Pennington wrote:



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?


I think you spelled out the solution.

/*you lose*/

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.

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.


Christopher Blizzard

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