Re: [PATCH] xft and menus recoding from local charset to utf8




On Feb 15, 2005, at 10:34 AM, Anton Kazennikov wrote:


On Mon, 14 Feb 2005 20:47:42 -0800 John Harper <jsh unfactored org> wrote:

do you understand why pango doesn't work? fixing that may be easier..
No, I don't understand it yet. I'll try to fix it too. But rendering fonts
with pango does almost the same thing: encode to utf8 before calling
pango functions. It is slightly better than doing this when rendering with
xft only because pango depends on glib.

ok, thanks


I'm wondering if instead it might be better to make sawfish use UTF-8
encoding everywhere, i.e. every text property is automatically
converted to UTF-8 when read, and we try to never work with text in the user's locale.. (since that seems to be the root of all these problems)
It's a good idea. But the problem is with rep. It doesn't work well with utf8. For example string-match works incorrectly with multibyte characters. Same with length. It might cause some problems on window matching if using
national chars.
But that way of solving this problem is definitely better than one in the
proposed patches.

I hacked together a quick attempt at doing this last night:

Attachment: patch
Description: Binary data



I'm interested if it makes things better, worse, no different, etc..? I realize that the menu code to ellipsize strings still doesn't handle UTF-8

(It would be best to add UTF-8 aware functions to rep, e.g. utf8-length, utf8-string-match, etc.. but I don't have time right now..)

    John





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