[Israel.pm] multipart/alternative added

Amit Aronovitch aronovitch at gmail.com
Sun May 30 08:51:46 PDT 2010


just some<technical bidi-related nitpicking> ...

On 05/27/2010 08:46 PM, Gaal Yahas wrote:
> Hi Mikhael,
>
> It is my understanding that this change was made for two reasons: the 
> possibility of embracing Hebrew as an acceptable language for posts on 
> this list, and the related technical questions regarding the 
> difficulty of transferring Hebrew correctly over plain text email.
>
> The first reason can afford social debate. As Gabor pointed out, there 
> are people on this list who don't know Hebrew and it's perhaps 
> discourteous to them to accept another language. But this is offset by 
> the fact that this is a local Mongers list, and there is no other 
> forum on the internet where people who are uncomfortable with English 
> can participate and have a conversation about Perl in Hebrew. The list 
> can debate this more but personally, I think this is a perfectly fine 
> goal, even if I'm quite likely to make my own posts in English due to 
> personal preferences.
>
> The other is technical. It is simply impossible to get all email 
> clients to work correctly in bidi languages using only plain text.

Not impossible. Just "not simple at the moment", as we can see even in 
Oron's message, which does not mix LTR and RTL text in the same line (in 
thunderbird, for example, the semicolons/colons display in the wrong 
side of the code/hebrew when you use the keyboard shortcut to switch to 
RTL/LTR mode, respectively. You can never see them both in the same 
window without any garbling).
To really solve the garbling, one has to use unicode control characters. 
Samples:

הנה קטעי הקוד של גבור--->:

‫הגדרת משתנה סקלרי:‬
‪my $x = 42;‬
‫הגדרת מערך:‬
‪my @x = qw(4 2);‬

ושיהיה קצת יותר מעניין, בשורה אחת--->:

‫נגדיר משתנה סקלרי ע"י ‪my $x = 42;‬ ואח"כ עוד משהו.‬

‪Look mom, no HTML!‬

Of course, I "cheated" by using characters which are not available in 
common keyboard layouts.  The point is that one could write simple 
scripts to do that automatically in the MUA (e.g. as some plugin 
activated when submitting "rich text" as plaintext).
Once such a solution is out there, it should be easier to spread it to 
other agents (maybe even to gmail).

> Alignment is the least of your problems.

But alignment is the only part of the problem that *can not* be solved 
in plaintext.
Simply due to the fact that plaintext does not provide a way to encode 
that information (so user agents use their own algorithms to decide, if 
at all, and you can not rely on having it displayed the same way 
everywhere).

> If you mix Hebrew and English in the same paragraph, it is almost 
> certain that garbling will occur. In prose this is just very annoying. 
> In technical discussion it can render text completely unreadable.
>
> Examples of garbling include reversed parentheses, misplaced 
> punctuation, reversed number segments. These have potential to do real 
> damage to coherence of the text. Unicode offers some technology to 
> help with this, but it is just not sufficient for email when used in 
> plain text. There are underspecified features that are interpreted 
> differently by clients, and regardless, these mechanisms are hard to 
> use, even for a technical user.

Well, I still have to see if my examples above work or not 
(thuderbird/icedove is known to do some garbling of its own if you 
choose the wrong setup option).
Unicode does have enough support to prevent all the garbling you mention 
(excluding alignment). The problem is that user agents do not insert the 
proper unicode. The community could help by writing plugins, but we are 
too lazy and prefer to revert to an "evil" but working solution such as 
HTML (at least until someone else writes the script).

</technical nitpicking>

   cheers,
        Amit



More information about the Perl mailing list