Re: Converting visual to logical string

Tzafrir Cohen <[email protected]>
Newsgroups gmane.comp.internationalization.fribidi
Message-ID <[email protected]>
On Wed, Aug 10, 2005 at 04:17:19PM -0400, Kenneth M Horan wrote:
>         I have some documents created using ParsNegar which stores 
> characters in visual order that I would like to convert to Unicode.  I've 
> translated each ParsNegar character to its correct Unicode value, however 
> I've been unable to convert the string into the correct logical order. 
> Everywhere I've looked I haven't been able to find a single thing about 
> how to do this.  Fribidi looks like it would be great for testing if I've 
> encoded the text correctly, but I have no clue how to encode it!  I was 
> reeeeeally hoping to find a fribidi_vis2log() function but unfortunately I 
> don't see it.  Surely I'm not the first person who has ever wanted to 
> create a logical string from a visual one.  Can anyone help me out?

A simple hueristic would be to use fribidi_log2vis. It would work well
for most cases.

If you could provide cases where it works badly enough and a
fribidi_vis2log should be tuned otherwise it may be worth adding. But
until then you'd probably be better off using log2vis.

-- 
Tzafrir Cohen         | [email protected] | VIM is
http://tzafrir.org.il |                           | a Mutt's  
[email protected] |                           |  best
ICQ# 16849755         |                           | friend
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.