https://bugzilla.wikimedia.org/show_bug.cgi?id=17766

--- Comment #22 from Volker Haas <volker.h...@pediapress.com> 2011-08-05 
09:39:29 UTC ---
I investigated the 'nukta issue'.

Some preliminary remarks:

We are using a python library which implements the bidi algorithm. This
algorithm basically reorders characters from their logical (the "direction" of
storage) to their visual ordering. The library uses the fribidi c library.
Details can be found at [1]

After the tests I have done, I believe the fribidi library screws up when
reordering:

word investigated:
חַיְפַא

logical ordering (this is how the string is stored)
ח 1495
 1463
י 1497
 1456
פ 1508
 1463
א 1488
ERRONEOUS transformation by fribidi
א 1488
פ 1508
 1463
י 1497
 1456
ח 1495
 1463
correct transformation (manually transformed):
א 1488
 1463
פ 1508
 1456
י 1497
 1463
ח 1495

I checked the manual transformation in the PDF and the result is as expected
(same as in the browser).

Minimal example in python:

first install pyfribidi: easy_install pyfribidi

the run python (or ipython):

----
In [35]: import pyfribidi2

In [36]: text = unicode('חַיְפַא', 'utf-8')

In [37]: bidi_trans = lambda t: pyfribidi2.log2vis(t,
base_direction=pyfribidi2.RTL)

In [38]: for c in bidi_trans(text): print c, ord(c)
   ....: 
א 1488
פ 1508
 1463
י 1497
 1456
ח 1495
 1463
----

To me it looks as if the fribidi library needs to be fixed. Help is welcome ;)

[1] http://pypi.python.org/pypi/pyfribidi/0.10.0

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to