Re: Does anyone know X and utf-8? Help us with ui i18n prob.



Am Samstag, den 22.08.2009, 08:15 +0900 schrieb Teika Kazura:
> Hi, all. As I wrote, I finally located the root of the GUI i18n
> error. :) (You may already know it, but the symptom is that if the
> locale is set, many non-ascii letters in configurator GUI are not
> printed.)  It's the communication between gui and sawfish server,
> coded in src/libclient.c and src/events.c.
> 
> In general, not only configurator, but any sawfish client talks with
> the server via client_eval() which is the mere wrapper of
> net_server_eval() in libclient.c. There, X event functions are used to
> trigger the action of server, and XGetWindowProperty is called to
> obtain the return value from server to client. I suspect that the
> rewriting of events.c last year which improved utf-8 handling of wm
> caused the problem.
> 
> Can anyone fix it? It seems to require X event and property knowledge,
> and how X treats the encoding. I've attached two patches of last year
> which seem to have introduced this problem, hoping they may give
> hints. (I don't know X at all. I'm not good at C, but it does not
> affect for this issue.)
> 
> You can confirm it easily:
> 1. Export wm-eval in ui/wm.jl,
> 2. Say, in run-shell in ui/shell.jl, require rep.io.streams and
>    sawfish.ui.wm, and eval
>     (format standard-error "%s, %s\n"
>             "ó¿雨" ; or any string
> 	    (wm-eval "ó¿雨")) 
>    The former is printed correctly, but the latter which is
>    thrown to and back from server gets garbled.
> 3. wm/customize.jl redirects the output of sawfish-ui to /dev/null, so
>    make it spit out to a file.
> 4. It is triggered when you invoke the configurator.
> 
> There may lie other i18n problems, but this must fix most of them.
> 
> Chris wrote:
> > You shouldn't have written that mail.
> !? 
> > I'll burst with curiosity until the patch arrives XD
> Are you still alive? Sorry, not patch. ;)

Yep.

> Thank you all, especially Wang Diancheng, Chris, and my loyal servants,
> git-grep and format-stderr.
> 
> Happy sawfish,
> Teika (Teika kazura)

You may send a copy to Timo, he seems to know about that, as he fixed
utf8 in window-titles via X.

Chris

Attachment: signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil



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