From: Mark Leisher (mleisher@crl.NMSU.Edu)
Date: Sun May 22 2005 - 12:36:32 CDT
Raymond Mercier wrote:
> [This is really a question for the Hebrew Computing Forum, but I have
> tried there and drew a blank.]
> The problem is that I composed many documents in Word using an ad hoc
> Hebrew font, and wish to convert to Unicode.
> When I run a macro that exchanges the old codepoints for the U+Hebrew
> points, the characters in each word are reversed. I have tried to cure
> this by writing another macro using StrReverse() . Sometimes this works,
> but there are problems - especially with tables.
> Does anyone have experience of this, and or/a solution ?
> I will have the same problem with Arabic Word docs.
> Raymond Mercier
Having had a fair amount of experience with exactly this sort of thing, you
will basically need to implement something similar to the Unicode bidi
reordering algorithm to properly reorder your text.
Someone may have a routine already for Arabic Word since a lot of text exists
in that format.
In general, I've found that special cases arise frequently and cause problems
requiring custom coding for reordering depending on the font and script. If
you are only dealing with one script, one font, and lots of text, it might be
cheaper to write a real reordering routine with a toolkit that reads and
writes Word documents.
Your current approach is not unreasonable assuming you don't have a huge
amount of text to reorder. We reordered a lot of documents that way ourselves.
-- --------------------------------------------------------------------------- Mark Leisher Computing Research Lab Frantic orthodoxy is never rooted in New Mexico State University faith but in doubt. It is when we are Box 30001, MSC 3CRL unsure that we are doubly sure. Las Cruces, NM 88003 -- Reinhold Niebuhr (1892-1971)
This archive was generated by hypermail 2.1.5 : Sun May 22 2005 - 12:36:51 CDT