Found true cause of ui i18n problem.



Hi, all. This time I found the true cause of ui i18n problem.

But let me apologize first. The last time, I reported a wrong
conclusion and made a noise.

The root of evil is so simple. It was deliberately escaped, as you
guys noticed. Evaluate
(let ((print-escape t))
  (format standard-error "%S" ",A+(Bs$(D+Q(Brry for $B8mJs,A;(B"))
and you get the same result. %S is the same for %s except
the string gets escaped. (escape is done for c < 32 and c > 126)

It's coded in (server-eval val), in wm/server.jl, which is called from
src/server.c.

I tried the simplest: letting print-escape to nil, and it seems to
work. Deceptively easy.
------------------------------------------------------------------------
--- server.jl.orig	2009-04-26 16:10:30.645790918 +0900
+++ server.jl	2009-08-24 16:30:17.237072032 +0900
@@ -57,7 +57,9 @@
   (define server-window nil)
 
   (define (server-eval form)
-    (let ((print-escape t))
+    (let (
+	  (print-escape nil)
+	  )
       (condition-case error-data
 	  (progn
 	    (setq form (read-from-string form))
------------------------------------------------------------------------

If this patch is ok in the configurator, then it must be harmless,
unless you don't some hack through sawfish-ui. By git-grep'ping for
client-eval, client_eval, and wm-eval in lisp/sawfish and scripts/,
only sawfish-ui and sawfish-client seem to call server-eval.
(I believe so, because it's client-server relation function.)

Well, it's not complete yet. Interactive mode in sawfish-client
remains the same. (Server attachment "-e" works.) I've browsed  at
scripts/sawfish-client.jl, but don't know why.

Because it works, it doesn't seem to me that escape is necessary. But
if escape is in fact needed, then the change of escape range is
next candidate.

Thanks, especially Timo, for taking notice.

Sincerely,
Teika (Teika kazura)



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