MeirKriheli / python-bidi

BIDI algorithm related functions
GNU Lesser General Public License v3.0
105 stars 16 forks source link

Lines Reversed #6

Closed antonays closed 2 months ago

antonays commented 7 years ago

Hi, It appears that when using get_dislplay(str) on Hebrew strings, the output comes out in the correct direction for Hebrew words, but the lines are reversed, i.e - first line (logic) appears as last line (visual).

Example: expected output: לווייתן מצוי (לעתים רורקל או רורקל ענק); שם מדעי: הוא יונק ימי ממשפחת לווייתני ענק שבסדרת הלווייתנאים. זהו הלווייתן השני בגודלו, ובעל החיים השני בגודלו החי כיום אחרי הלווייתן הכחול. הלווייתן המצוי עשוי להגיע לאורך של כמעט 27 מטר ומשקל של 120 טון אך אורכו נע בדרך כלל בין 18 ל-21 מטר ומשקלו הממוצע הוא כ-70 טון.

received output: לאורך של כמעט 27 מטר ומשקל של 120 טון אך אורכו נע בדרך כלל בין 18 ל-21 מטר ומשקלו הממוצע הוא כ-70 טון. הלווייתנאים. זהו הלווייתן השני בגודלו, ובעל החיים השני בגודלו החי כיום אחרי הלווייתן הכחול. הלווייתן המצוי לווייתן מצוי (לעתים רורקל או רורקל ענק); שם מדעי: הוא יונק ימי ממשפחת לווייתני ענק שבסדרת

HadySoliman commented 4 years ago

I wonder if you ever solved this

MeirKriheli commented 2 months ago

Please test with 0.5.0 an re-open if needed.

PS, if the sentence is a single line (without paragraph breaks), it's up to the displaying mechanism to handle overflows correctly.