469,573 Members | 1,075 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,573 developers. It's quick & easy.

BOF in the included file shows up in the browser

aa
I have an UTF-8 PHP file which generates HTML
Then I cut the beginning of that file, pasted into another UTF-8 file ind
included this second file into the first one.
After that the whole page moved down about one libe leaving a gap at the top
of the browser window.

Viewing the resulting code of the first file via VIEW-Source, I and see a
square inserted before the included file.
This does not show if I open the included file with a Unicode supporting
text editor. A non-unicode editos shows i>?
at the beginning of the file which, I understand, is BOF.
So the problem is that the browser sees the second BOF and displays it as a
small square in a separate line

How do I get round it?
Jul 17 '05 #1
2 1768
"aa" <aa@virgin.net> wrote in message
news:41***********************@ptn-nntp-reader03.plus.net...
I have an UTF-8 PHP file which generates HTML
Then I cut the beginning of that file, pasted into another UTF-8 file ind
included this second file into the first one.
After that the whole page moved down about one libe leaving a gap at the top of the browser window.

Viewing the resulting code of the first file via VIEW-Source, I and see a
square inserted before the included file.
This does not show if I open the included file with a Unicode supporting
text editor. A non-unicode editos shows i>?
at the beginning of the file which, I understand, is BOF.
So the problem is that the browser sees the second BOF and displays it as a small square in a separate line

How do I get round it?


Storing PHP script as UTF-8 is a bad idea. The character at the beginning of
the file is zero width non-break space. Editors that support UTF-8
automatically insert it at the beginning of every file so that they can tell
the file is UTF-8 encoded when you re-open it.

Resave your scripts in ASCII and the problem will go away.
Jul 17 '05 #2
aa
Thanks,

One thing worries me: I feel uncomfortable inserting ANSI file into a UTF
file - what would be the result?
Besides in the included file thwere are string literals in Cyrillics and
they get lost

"Chung Leong" <ch***********@hotmail.com> wrote in message
news:mo********************@comcast.com...
"aa" <aa@virgin.net> wrote in message
news:41***********************@ptn-nntp-reader03.plus.net...
I have an UTF-8 PHP file which generates HTML
Then I cut the beginning of that file, pasted into another UTF-8 file ind included this second file into the first one.
After that the whole page moved down about one libe leaving a gap at the top
of the browser window.

Viewing the resulting code of the first file via VIEW-Source, I and see a square inserted before the included file.
This does not show if I open the included file with a Unicode supporting
text editor. A non-unicode editos shows i>?
at the beginning of the file which, I understand, is BOF.
So the problem is that the browser sees the second BOF and displays it

as a
small square in a separate line

How do I get round it?

Storing PHP script as UTF-8 is a bad idea. The character at the beginning

of the file is zero width non-break space. Editors that support UTF-8
automatically insert it at the beginning of every file so that they can tell the file is UTF-8 encoded when you re-open it.

Resave your scripts in ASCII and the problem will go away.

Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by D. Alvarado | last post: by
4 posts views Thread by Matt Kruse | last post: by
3 posts views Thread by Steven Thomas | last post: by
9 posts views Thread by John C. Frickson | last post: by
7 posts views Thread by Jeff Gaines | last post: by
rajiv07
3 posts views Thread by rajiv07 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.