{% extends %} and UTF-8

40 views
Skip to first unread message

DocDay

unread,
Apr 4, 2009, 1:14:10 AM4/4/09
to Google App Engine, Googl...@eoasys.com
I'm having trouble with non-printing "trash" characters forcing a gap
at the top of my page. In "view source" they look like two small side-
by-side dashes at the top of the page. This happens both with the SDK
and online.

HTTP analysis shows three UTF-8 BOMs at the beginning of the page.
Coincidently, there are three UTF-8 html files involved in creating
the page.

The first line of html-1 is: {% extends "html-2" %}
The first line of html-2 is: {% extends "html-3" %}
The first line of HTML-3 is: {# {% spaceless %} #}

The first thing in the page <head> is this:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

Converting two or more of the html files to 8-bit ansi encoding
removes the problem characters and the gap. Problem solved.

Is GAE causing this?

Alkis Evlogimenos ('Αλκης Ευλογημένος)

unread,
Apr 4, 2009, 4:03:48 AM4/4/09
to google-a...@googlegroups.com


On Sat, Apr 4, 2009 at 7:14 AM, DocDay <Googl...@eoasys.com> wrote:
Is GAE causing this?

I think its your editor.


--

Alkis

DocDay

unread,
Apr 4, 2009, 5:57:59 AM4/4/09
to Google App Engine
I did forget to mention that the BOM I am seeing is "EF BB BF", which
is correct for UTF-8, according to http://www.unicode.org/faq/utf_bom.html.

When I see three of them, I mean I am seeing "EF BB BF EF BB BF EF BB
BF" at the beginning of the entity from the server. As I convert each
of the html files to 8-bit ansi, one of the BOMs received from the
server drops out. After converting two of them, the server sends only
one BOM, "EF BB BF", and my problem is gone (which seems to make sense
what with the meta containing "...charset=utf-8" ?). After converting
all three of them, the server sends no BOM at all, continuing the
pattern.

It's hard for me to see how this could be my editor. BTW, I'm using
Programmer's Notepad 2.




On Apr 4, 4:03 am, Alkis Evlogimenos ('Αλκης Ευλογημένος)
<evlogime...@gmail.com> wrote:

Alkis Evlogimenos ('Αλκης Ευλογημένος)

unread,
Apr 4, 2009, 6:45:00 AM4/4/09
to google-a...@googlegroups.com
Maybe your editor has an option to stop writing BOMs? That will solve the problem. You do not need a BOM for utf-8. The encoding is endianness independent to begin with.

2009/4/4 DocDay <Googl...@eoasys.com>



--

Alkis

DocDay

unread,
Apr 4, 2009, 5:32:59 PM4/4/09
to Google App Engine
I just checked and it does. That does the trick.

Thanks!


On Apr 4, 6:45 am, Alkis Evlogimenos ('Αλκης Ευλογημένος)
<evlogime...@gmail.com> wrote:
> Maybe your editor has an option to stop writing BOMs? That will solve the
> problem. You do not need a BOM for utf-8. The encoding is endianness
> independent to begin with.
> 2009/4/4 DocDay <Google....@eoasys.com>
>
>
>
>
>
>
>
> > I did forget to mention that the BOM I am seeing is "EF BB BF", which
> > is correct for UTF-8, according tohttp://www.unicode.org/faq/utf_bom.html
> > .
>
> > When I see three of them, I mean I am seeing "EF BB BF EF BB BF EF BB
> > BF" at the beginning of the entity from the server. As I convert each
> > of the html files to 8-bit ansi, one of the BOMs received from the
> > server drops out. After converting two of them, the server sends only
> > one BOM, "EF BB BF", and my problem is gone (which seems to make sense
> > what with the meta containing "...charset=utf-8" ?). After converting
> > all three of them, the server sends no BOM at all, continuing the
> > pattern.
>
> > It's hard for me to see how this could be my editor. BTW, I'm using
> > Programmer's Notepad 2.
>
> > On Apr 4, 4:03 am, Alkis Evlogimenos ('Αλκης Ευλογημένος)
> > <evlogime...@gmail.com> wrote:
> > > On Sat, Apr 4, 2009 at 7:14 AM, DocDay <Google....@eoasys.com> wrote:
> > > > Is GAE causing this?
>
> > > I think its your editor.
>
> > > --
>
> > > Alkis
>
> --
>
> Alkis- Hide quoted text -
>
> - Show quoted text -
Reply all
Reply to author
Forward
0 new messages