By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,722 Members | 1,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,722 IT Pros & Developers. It's quick & easy.

BOF in the included file shows up in the browser

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
"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

P: n/a
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.