[FriBidi] FriBidi perl module doesn't work for me...
Thurn, Martin
martin.thurn at ngc.com
Mon Sep 26 07:29:53 PDT 2005
Ok I got perl FriBidi working. Thank you for your replies. The trick
is that the UTF-32 string sent to fribidi has to be LITTLE ENDIAN. So,
here is some sample code that WORKS:
use Encode;
use FriBidi;
my $sLogical = 'imagine some UTF-8 Hebrew text here';
Encode::from_to($sLogical, 'utf-8', 'UTF-32-LE');
my ($sVisual, $sDirection) = &log2vis($sLogical);
# Convert string back to Perl's internal representation:
my $sVisual = Encode::decode('UTF-32-LE', $sVisual);
# Now you can insert $sVisual into a Tk Text widget, for example
__END__
- - Martin
More information about the fribidi
mailing list