Hebrew words reversed in Word export

For all things Mellel

Moderators: Eyal Redler, redlers, Ori Redler

Post Reply
Enkidu Jones
Read the guide!
Posts: 36
Joined: Thu Oct 20, 2005 10:44 pm
Location: Sydney, Australia

Hebrew words reversed in Word export

Post by Enkidu Jones »

Using Mellel 3.3.6 on Mac OS X 10.10 (Yosemite public beta 4) I have encountered a problem. When I export a document which is predominantly English but includes some Hebrew to Word format (or RTF) and open it in Word 2007 on Windows 7, strings of Hebrew words are reversed. I can't easily check whether this only happens on Yosemite at the moment.

To clarify, here's an example. In Mellel I might have the following:
בראשית ברא אלהים
When I export this and open it in Word on Windows, I see the following:
אלהים ברא בראשית

Is it just me?
rpcameron
Knows everything, can prove it
Posts: 980
Joined: Wed Oct 26, 2005 12:48 am
Location: IE, CA, USA

Re: Hebrew words reversed in Word export

Post by rpcameron »

Have you tried inserting a Unicode RLE control character before the Hebrew text, and followed by a LRE marker after? That way the system, whatever it happens to be, will know that the Hebrew text is to be RTL.
— Robert Cameron
jgcook0
New to all this
Posts: 4
Joined: Wed Aug 20, 2014 7:06 am

Re: Hebrew words reversed in Word export

Post by jgcook0 »

I am having this identical problem, with Syriac, when exporting the latest version of Mellel to a Windows 7 computer that has Word 2007.
What are the Unicode Hex signs for RTL and LTR?
rpcameron
Knows everything, can prove it
Posts: 980
Joined: Wed Oct 26, 2005 12:48 am
Location: IE, CA, USA

Re: Hebrew words reversed in Word export

Post by rpcameron »

jgcook0 wrote:I am having this identical problem, with Syriac, when exporting the latest version of Mellel to a Windows 7 computer that has Word 2007.
What are the Unicode Hex signs for RTL and LTR?
RLE: U+202B; LRE: U+202A

There is also the Right-to-Left Override (RLO): U+202E; and LRO: U+202D. An override or embedding stream must be terminated by a Pop Directional Formatting (PDF) control character: U+202C; this will resume your document/paragraph's default text direction.
— Robert Cameron
jgcook0
New to all this
Posts: 4
Joined: Wed Aug 20, 2014 7:06 am

Re: Hebrew words reversed in Word export

Post by jgcook0 »

Thanks, Robert. I tried the URL codes, and the PC still put the Syriac in reverse order. I asked an administrator at Beth Mardutho (who makes the Syriac fonts), and they informed me,
"I can tell you from experience that there is no way to cleanly export a file from Mellel and get it to work correctly in other programs or operating systems. I’ve tried this many different ways, and the Syriac text is always wrong somehow."
I am wondering if anyone has had success exporting Syriac from Mellel via rtf to a PC?
rpcameron
Knows everything, can prove it
Posts: 980
Joined: Wed Oct 26, 2005 12:48 am
Location: IE, CA, USA

Re: Hebrew words reversed in Word export

Post by rpcameron »

It sounds like the problem may be Word/Windows' BiDi algorithm in Uniscribe causing the issues. Certain Unicode ranges are supposed to trigger BiDi handling, but Uniscribe might not support Syriac properly. In any case, override codes ought to fix this, so it might be a bug.

I wonder if you created it as HTML if it would render properly? Once upon a time I used to write my documents in HTML, then import that into Word—it helped to ensure sanity with styles and semantic headings/groupings. Also, in HTML you can specify formatting for printing to ensure margins, &c. An alternative might be (Multi)Markdown, and export to HTML with some style templates ... That will also ensure everyone can view it, and archival can be easier since you're only dealing in plain text.
— Robert Cameron
jgcook0
New to all this
Posts: 4
Joined: Wed Aug 20, 2014 7:06 am

Re: Hebrew words reversed in Word export

Post by jgcook0 »

Thanks, I'll try that!
jgcook0
New to all this
Posts: 4
Joined: Wed Aug 20, 2014 7:06 am

Re: Hebrew words reversed in Word export

Post by jgcook0 »

James,
it turns out I had not set up the PC properly for Syriac. Once I did that the Syriac word order came out perfectly!
thanks for helping,
John
rpcameron
Knows everything, can prove it
Posts: 980
Joined: Wed Oct 26, 2005 12:48 am
Location: IE, CA, USA

Re: Hebrew words reversed in Word export

Post by rpcameron »

Glad to know a solution was found.
— Robert Cameron
Post Reply