[b-hebrew] Hebrew in messages

Peter Kirk peterkirk at qaya.org
Mon Jul 11 07:17:18 EDT 2005

On 10/07/2005 04:51, Karl Randolph wrote:

>Only once have I sent you Hebrew encoded as character entities. All the other times, I wrote Hebrew, at least once specifically encoded as UTF-8, and somewhere between my screen and yours it was translated to character entities. Yet when you replied, quoting my Hebrew which was changed to character entities, my browser rendered it as Hebrew. Even the time I specifically wrote out the character entities, your quote of it was rendered as Hebrew when I looked at your reply.

The problem is somewhere between your screen and the cable out of the 
back of your computer - or more precisely the cable out of the back of 
your remote mail client's system, since you are using webmail. Your 
webmail system sends invalide Hebrew codes, and when it receives those 
same invalid codes it treats them as valid. That simple interpretation 
explains all the observed facts.

>When I looked at http://kodesh.snunit.k12.il/i/t/t0101.htm both Camino and Safari read the third line down in the html to find <meta http-equiv="Content-Type" content="text/html; charset=windows-1255"> and automatically read the rest of the page as Windows Hebrew. Hence it read the page as a Windows document, not unicode. When I tried to read it as unicode, all the Hebrew was rendered as question marks.

This Hebrew web page is correctly (as far as I know) encoded in 
Windows-1255. Of course you will get bad results if you force your 
browser to override its indicated encoding and interpret it as UTF-8 

>As for the B-Hebrew archive software, it changed the Windows-1255 encoding  to character entities. No problem there, as all browsers should be able to render that correctly. However, it changed character entities to html text strings which no browser can render as Hebrew. That is definitely a bug in the program. The program should read character entities without changing  them to html character strings. ...

No, it should not. The software should, and does, convert correctly 
between different encodings, and as the archives are in HTML it is 
correct for it to translate certain characters to HTML character 
entities. But, as is standard practice when reading plain text into 
HTML, characters like "&" are "escaped" e.g. replaced by "<amp>", to 
ensure that they are interpreted as plain text rather than as part of an 
HTML code. For in plain text a string of characters starting with "&" 
and ending with ";" is not a character entity (which is an HTML concept) 
but simply a string of characters. After all, someone may really want to 
display such a string of characters rather than insert a Hebrew or other 
character. Indeed I just wanted to do just that, but I realised that I 
couldn't because your mail software would probably incorrectly render 
the string "&#1488;" (I typed ampersand, hash, "1488", semicolon) as a 
Hebrew character.

>... Secondly it should read UTF-8 coding correctly.

I have seen no evidence that it does not, and Kirk has also confirmed 
that it handles UTF-8 correctly.

>A non-standard encoding scheme like Windows-1255 requires a Windows aware browser in order to render it correctly. Secondly, the browser needs to be set to Windows Hebrew.

Introducing "Windows" here is a bit confusing, and perhaps a red rag to 
some. But this Windows encoding is a properly defined code page which is 
properly supported by many mail programs and browsers (certainly by 
Mozilla, Thunderbird, Firefox and Camino) on many operating systems. I 
could have referred instead to the ISO equivalent, but unfortunately 
there is some confusion about different variants for Hebrew. A good 
browser or mail program will automatically set its encoding to what is 
indicated in the web page or message; manual setting of encodings should 
be necessary only when the page creator or sender has messed up.

>Not all mail programs can render character entities correctly.

In plain text e-mail, which means all postings on this list, character 
entities should not be rendered except as strings starting with "&", 
because there is no such thing as a character entity. The mail program, 
yours, which renders them in any other way is the one which has a problem.

>There is a bug (or more) in the archive program that changes character entities to html text strings. I have no idea what it would do to UTF-8 encoding. But seeing as it changes Windows-1255 to character entities, I am not hopeful.

The archive program is working correctly. It changes strings in plain 
text which, in an HTML context, might be misinterpreted as character 
entities into strings which cannot be so misinterpreted. It correctly 
replaces certain Windows-1255 and UTF-8 characters with character entities.

>... If we could show the Hebrew text in our email messages, that would be a big improvement. But apparently that day is not here yet.

Maybe not, but we would be a lot closer if list members and their 
software conformed properly to the standards.

Peter Kirk
peter at qaya.org (personal)
peterkirk at qaya.org (work)

No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.8.11/45 - Release Date: 09/07/2005

More information about the b-hebrew mailing list