Problems with IE - having '??' at the beginning of the page

4 views
Skip to first unread message

oritk

unread,
Jan 19, 2012, 11:45:37 AM1/19/12
to PyWeb-IL
i know it sounds a bit crazy.. but i've been struggling with this for
few days now and would like to see if someone here had a similar
problem or can direct me to a solution.

my site runs ok with all browsers, but i found out that in IE (7) -
all "hover" styles do not work. i did some research and found
solutions and right now it should all work. but still - no go. i
copied the home page that i get from the django server and indeed -
hover does not work.
BUT - when i copied the whole source, i found out that at the
beginning of the page, there are 2 extra characters, like that:

??<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">


Taking those out (in a local copy) - and it all works.
off course - it does not bother the other browsers, which act
normally.
my guess it that those characters are somehow related to the fact that
this is a Hebrew site.

Any idea?
thanks, Orit

Shai Berger

unread,
Jan 19, 2012, 12:02:19 PM1/19/12
to pywe...@googlegroups.com
These characters (bytes) are probably what's known as a "BOM" -- they are
there to indicate if a UTF-16 encoded text is big-endian or little-endian.

You don't want that. You want everything in UTF-8.

The characters for BOM are 0xFF and 0xFE, IIRC.

They may come either from your templates (if you've edited them with an Evil
editor) or from your web-server (if it is Evil). As a hint, most Evil things
(this type of Evil, anyway) come from the Windows world.

HTH,
Shai.

oritk

unread,
Jan 19, 2012, 3:11:53 PM1/19/12
to PyWeb-IL
Bingo :)
i have the option to "save without BOM" but first - i did not know
what it means...
More then that - i tried it, but i was not aware that i have to do
that on all my files, not only the base template.
thanks a lot, Orit

Yishai Beeri

unread,
Jan 20, 2012, 5:23:52 AM1/20/12
to pywe...@googlegroups.com
Funny (though not surprising) that the Evil browser is the only one to
choke on the chars inserted by the Evil editor :)

Yuval Adam

unread,
Jan 20, 2012, 5:34:50 AM1/20/12
to pywe...@googlegroups.com
#poeticjustice

--
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pywe...@googlegroups.com.
To unsubscribe from this group, send email to pyweb-il+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/pyweb-il?hl=en.




--
Yuval Adam
http://y3xz.com


Amit Aronovitch

unread,
Jan 21, 2012, 4:15:50 AM1/21/12
to pywe...@googlegroups.com
On Thu, 19 Jan 2012 22:11:53 +0200, oritk <oki...@gmail.com> wrote:

Bingo  :)
i have the option to "save without BOM" but first - i did not know
what it means...
More then that - i tried it, but i was not aware that i have to do
that on all my files, not only the base template.
thanks a lot, Orit

1. Saving without BOM - might mean that it still saves UTF16, just without the BOM (not in UTF8 as Shai suggested). This might be considered even more "Evil" than the original option. You should check that other browsers (non IE7) do not choke on that...

2. Orit - maybe you can shed some light on the mystery: which editor/IDE were you using (the one with the "save without BOM" option)?

3. Shai : Re: evil programs: Another source of this type of "evilness" is Java. Similarly to Windows programs, the problem is wide adoption of early (pre-2.0) versions of Unicode in the 90's, combined with clear preference for backwards-compatibility over standards compliance. To the point where official documentation is not updated and contain bluntly misleading statements like "Unicode is a 16-bit character encoding" ( Oracle's Java tutorial ). People actually learn from these sources - no wonder they produce broken software.
Luckily, major languages spoken in our tiny country fit in the BMP, so we do not see the full scale of the problem (I do not know how people in east Asia cope with this).

    Amit

oritk

unread,
Feb 8, 2012, 12:01:08 AM2/8/12
to PyWeb-IL
The editor is Notepad++ and the full name they give it is "utf-8
without BOM".

As for browsers - i did not have any problem with chrome, FF, Opera or
Safari, only with the evil IE7... i did not check later versions of
IE, my assumption is that if it works on IE7 it will work on later
ones... so im checking the other ones only once in a while...

On Jan 21, 11:15 am, Amit Aronovitch <aronovi...@gmail.com> wrote:
> On Thu, 19 Jan 2012 22:11:53 +0200, oritk <okis...@gmail.com> wrote:
>
> >>  Bingo  :)
> >>> i have the option to "save without BOM" but first - i did not know
> >>> what it means...
> >>> More then that - i tried it, but i was not aware that i have to do
> >>> that on all my files, not only the base template.
> >>> thanks a lot, Orit
>
> 1. Saving without BOM - might mean that it still saves UTF16, just without
> the BOM (not in UTF8 as Shai suggested). This might be considered even more
> "Evil" than the original option. You should check that other browsers (non
> IE7) do not choke on that...
>
> 2. Orit - maybe you can shed some light on the mystery: which editor/IDE
> were you using (the one with the "save without BOM" option)?
>
> 3. Shai : Re: evil programs: Another source of this type of "evilness" is
> Java. Similarly to Windows programs, the problem is wide adoption of early
> (pre-2.0) versions of Unicode in the 90's, combined with clear preference
> for backwards-compatibility over standards compliance. To the point where
> official documentation is not updated and contain bluntly misleading
> statements like "Unicode is a 16-bit character encoding" ( Oracle's Java
> tutorial )<http://docs.oracle.com/javase/tutorial/i18n/text/convertintro.html>.

oritk

unread,
Feb 8, 2012, 12:04:20 AM2/8/12
to PyWeb-IL
one more thing...
The symptom on IE was strange - almost anything worked ok, but not
everything.
The main issue was that the hover style did not work (i wanted a
cursor on some objects) and this sent me for a long research on hover
in IE...

Ori Hoch

unread,
Feb 8, 2012, 1:11:16 AM2/8/12
to pywe...@googlegroups.com, PyWeb-IL
maybe the BOM caused ie to go into quirks mode

--
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pywe...@googlegroups.com.
To unsubscribe from this group, send email to pyweb-il+u...@googlegroups.com.

Amit Aronovitch

unread,
Feb 8, 2012, 6:20:06 AM2/8/12
to pywe...@googlegroups.com
Well, NP++ is actually a good editor, and certainly not "evil".
Good that it saves utf-8. Should work on any modern browser.

Note that byte-order has no meaning in utf-8, and saving utf8 *with* BOM would probably be a bad idea (breaks backwards compatibility with ISO "ASCII-extensions", causes some programs to choke etc.).

   AA

--
You received this message because you are subscribed to the Google Groups "PyWeb-IL" group.
To post to this group, send email to pywe...@googlegroups.com.
To unsubscribe from this group, send email to pyweb-il+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages