RE: FriBidi perl module doesn't work for me...

"Thurn, Martin" <[email protected]>
Newsgroups gmane.comp.internationalization.fribidi
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.