On 2003-03-03, Moshe Kaminsky wrote: > Hi, > > Won't it be nice if at least I can make the output of any program to be > piped through bidiv (without explicitly mentioning it)? I tried > > mkfifo jojo > (while true; do; bidiv jojo; done) & > exec >jojo > > This works for basic output, but has (at least) the following problems: > o when there are colors, it gets confused about the width of the lines > o when I use more complicated applications like vim or lynx, nothing > works > Of course, bidiv filters the stream of characters that the program emits. For full-screen applications, this stream contains random parts of different aras of the screen, so reording it makes little sense. Actually this should also reorder some of the escape sequences so the results hould be really "funny".
> My questions are > 1. is there a more standard way to do this Write an application like GNU screen or Akka (or adapt one of them) that emulates a terminal (e,,g vt100) onto an internal buffer; have it filter every updated line in the buffer in whatever way you like, e.g. by passing it through bidiv and update the real terminal with the output of that filtering. Filtering through an external proccess has sub-optimal performace (though I doubt you would notice it), so it's better to do internal filtering (e.g. with libfribidi). Akka seems to do just that [I need to check it ASAP :-]. > 2. is there a way to overcome those problems > The problem with the standard way is that it's very uninviting to implement such a beast. This in itself could be solved with some library to do the goy details for you. > I guess that if the answer to question 2 is yes, this might be enough > for what Beni wants. > Not entirely. Running a screenshot of a program like lynx through bidiv will not produce right results, because the image doesn't contain enough information to do correct bidi. Basically any side-by-side texts that are not logically the same text will confuse it. That's why I want a new terminal model that will provide the terminal with enough information to do the bidi. BTW, it also makes sense to take into account other exotic script needs besides bidi: shaping, vertical directions, double-width, neccessarily variable-width (I think I heard that Indic scripts just can't be fixed width but I might be confused here), etc... > PS. What is the difference between using bidiv and fribidi? > `fribidi' is a library. It's also the name of its canonic test program, which has huge a lot of options, some even useful (e.g. controlling mirroring). `bidiv' is another program using this library, with less options but with some Hebrew goodies, e.g. autodetecting ISO-8859-8 and UTF-8, perhaps a better heuristic for guessing paragraph direction and more convenient defaults (padding by default on, to the current screen width). Did I miss anything? -- Beni Cherniavsky <[EMAIL PROTECTED]> pure virtual static warp shield (TNG++, All Good Things O-=) ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
