Hi Connie,

> 1. When viewed on WinXP/IE6, look what happens when you mouseover the
> Persian words at the end (i.e. left margin) of each line. You also
> pick up the space to the right of the first word in that line.
> Similarly, if you attempt to mouseover the first word in the line and
> are just a little off the word to the right, you unfortunately will
> pick up the last word in the line.  Is this a bug or just my usual
> crazy coding style? This problem not seen with Mozilla. Also not with
> left to right languages.

The problem is because you're applying the right-to-left direction on a
<span>.  <span> is an inline element, and if you make it rtl, IE assumes
that you're having some RTL text in the middle of a LTR block, because its
parent block tag's direction is ltr.  If you apply the direction to a block
element (such as <p>, <div>, etc.) then this problem would be solved.

> 2. When viewed on WinXP/Mozilla1.7a, the ZWNJ's completely throw off
> my mouseover javascript program. It "can not find"
> words with ZWNJ. And look what happens if you mouseover the Tajik
> eqivalent: it displays the Persian word ok but no ZWNJ.
> This problem not seen with IE. I left out all harakat just so it would
> work in Mozilla (and Macs) so I'm sorry to see this new problem.

Yeah, I saw this behavior on WinXP/Mozilla1.2.1.  It seems like Mozilla
doesn't like the the UTF-8 encoded ZWNJ characters.  I solved half of the
problem by replacing ZWNJ with &#8204; in the definitions for the Tajik
words.  I tried the same for other ZWNJ's, but it doesn't still work (at
least, the script doesn't trim off the ZWNJ from the word.)  Maybe you can
try to fully encode your Unicode text using numerical entities to see if
that works.  However, that would cuase a maintenance nightmare for you
without an HTML editor.

> 3. To make the javascript arrays, I had to put a Persian word running
> from right-to-left inside brackets [ ] running from left to right and
> this I did in MS Notepad. Somehow, whether I copied or pasted or if I
> switched language in the process some sort of invisible characters
> would be added or else the brakets would end up like this: [ [ with
> the 2nd one running in the opposite direction.  I had to keep re-doing
> and re-doing this, almost going crazy in the process. Maybe if
> brackets [ ] were in the Persian font, it would have been easier. I
> don't know. Punctuation in bidirectional situations is troublesome.

This is only a visual problem in my experience.  The key to successful
coding the Persian/English mixture in Notepad is keeping the following in
mind:

1.  Only switch to Persian keyboard when you want to type in Persian.  Type
all the non-alphabet characters using the English keyboard (including
numbers).
2.  Ignore what you see on the screen as much as you can.  If you see weird
stuff, sometimes saving your work and re-opening Notepad helps.
3.  If you want to insert text in the middle of a block, never go to that
location by a mouse click.  You may end up inserting the new text in the
wrong place.  What I do is go to the beginning of the line (or somewhere in
the English parts of text, and move myself using the arrow keys on the
keyboard.
4.  Never leave Word Wrap on.  Notepad has known problems with it when you
try to save the file.

But Notepad is a toy IMO.  Before you start losing your hair too quickly,
get yourself a real editor.  My favorite is the Frontpage text editor (I
never use its WYSIWYG, but the multi-lingual support in the editor is
decent.)  I use Frontpage 2003.  DreamWeaver's text editor is not bad as
well, but I have had problems with it editing Persian text.

> 4. Notepad also deposits 3 junk characters at the top, an i with 2
> dots, 2 right-angle brackets and an upside-down question mark, however
> you can't
> *see* them while in Notepad so you have to open the file in another
> text program to delete them.  These 3 junk characters prevent the
> webpage from working in certain browers.  Notepad is otherwise great
> because the latest one is WYSIWYG and makes Persian data-entry easy
> and these 3 junk chars are a small price to pay for that luxury.
> However, I'm open to a better tool.

Those are the BOM marks for UTF-8.  Notepad injects them under your nose,
and that's one of the reasons I avoid Notepad.  Frontpage text editor does
not have that problem.

A small note: what Notepad does here is *correct*, because it can instruct
other editors about the content encoding of the file.  It just doesn't work
with web documents, and that's expected, because Notepad has not been
designed for creating web documents.

> 5.  Since "-raa" and "-o" are considered 2 separate words in Persian
> script but hook up to the previous word in Tajik script, I had to
> employ the ZWNJ just to have a one-to-one correspondence between
> languages for the purposes of this project. I was wishing I had
> Behdad's beloved U+202F, the Narrow No-Break Space for this operation!

You can leave them as they are, and handle them in the JavaScript code (trim
them off of the end of the Tajik words maybe.)

> 6. I embedded the fonts again.  Looks beautiful on WInXP/IE6 and
> limited others. I presume it looks terrible on the rest.
> Still thinking about what to do about that. Behnam, how's the Tajik
> looking on your Mac?

A big (IMO) problem with font embedding is that if users save the document
on their HD (using IE of course) then the fonts will be gone.  Not a
professional image, if you ask me.

That's why I try to stick with the std fonts, and use other formats when a
custom font is absolutely necessary (PDF being my favorite).  Not the best
of solutions, of course, but works for me.

Hope this helps,
-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]



_______________________________________________
PersianComputing mailing list
[EMAIL PROTECTED]
http://lists.sharif.edu/mailman/listinfo/persiancomputing

Reply via email to