basic bidi support using perl

Moshe Kamensky samvimes at fastmail.fm
Mon Aug 21 15:37:41 CEST 2006


Hi,

I added basic bidi support, using the perl interface and the perl 
FriBidi module:

======

#! perl

use FriBidi;
use Encode;

sub on_line_update {
   my ($self, $row) = @_;
   my $line = $self->line ($row);
   my $text = $line->t;
   my $pad = ($self->ncol() - length($text));
   $text .= ' ' x $pad;
   $line->t(decode('UTF-32LE', log2vis(encode('UTF-32LE', $text))));
}

======

Just put it /usr/lib/urxvt/perl/bidi, and add bidi to the
URxvt.perl-ext-common resource. The FriBidi module is here:

http://sourceforge.net/project/showfiles.php?group_id=2722&package_id=42385

This extension works for basic bidi display. What doesn't work:
- When trying to select with the mouse, the selection is limited to the 
  original line length and position. I don't know how to change it.
- The rendition does not transform to match the text. This will require 
  a small change in the FriBidi.pm module.
- Writing and editing. I don't think this can be easily done using this 
  method.

Thanks,
Moshe

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.schmorp.de/pipermail/rxvt-unicode/attachments/20060821/ead24fa5/attachment.sig>


More information about the rxvt-unicode mailing list