473,657 Members | 2,490 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1900
"aa" <aa@virgin.ne t> wrote in message
news:41******** *************** @ptn-nntp-reader03.plus.n et...
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******** ************@co mcast.com...
"aa" <aa@virgin.ne t> wrote in message
news:41******** *************** @ptn-nntp-reader03.plus.n et...
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
10048
by: D. Alvarado | last post by:
Hello, I want my scripts to be warning and error free. Is it possible to check is a file has already been included as part of a "require", "require_once" or "include" call in the script? I guess I could just include everything and turn warnings/errors off, but I'd prefer not to do that. Much thanks -
19
2244
by: aa | last post by:
Is a PHP variable supposed to be seen in a .js file included into a .php file? I have a client side javascript code stored in a .js file which is included into a PHP file using <script src="filename.js></script> This code initialises a Javascript variable var u="string";
7
4030
by: Vojma | last post by:
I have a problem At my site I have designed a framework with tabs as below (tabs_1.asp) +----+ +------+ +-------+ | MC | | Cars | | Boats | + +------------------------- then, into tabs_1.asp I include another page
4
3459
by: Matt Kruse | last post by:
Let me break down the issue: Ultimate Goal: Building a custom debugger window which shows a function trace in and out of functions as they are called, which can be executed via IE's Context Menu and used on any page (no source changes needed, and all code can be IE-specific) Mid-term Goal: To retrieve all the javascript source in the page, to parse for function names, which can then be accessed in the window namespace to retrieve...
7
6375
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. I have my ASP.NET application building links along the lines of file://c:/<path to file>
3
2048
by: Steven Thomas | last post by:
I am working on a ASP.NET application using VB.NET. I have a function that creates a snapshot file on a separate server and passes a path back to the webpage. Now I want to display the snapshot. If I cut and paste the path into the browser it opens snapshot viewer. Exactly what I want. However, if I response.redirect to the path, I get a error that the file can not be found. If I response.redirect to "file:"+path It opens the snapshot...
9
1536
by: John C. Frickson | last post by:
My company produces reports for our customers in PDF format. I have a php script that verifies login status and access rights, and sends the pdf to the client using readfile(). This has worked fine until recently. One of our customers' reports is 10.6MB, and the customer never receives it and I can't get it either. I checked the Apache access_log, and it shows varying amounts of bytes being sent, but always close to 10MB. I tried...
7
2633
by: Jeff Gaines | last post by:
I have spent the day learning how to use Zend Development Environment. I can now produce a list of files in a directory, filtered by extension, and apparently clickable. Unfortunately clicking on them in a browser doesn't take me to the file link. I have found examples for clickable URL's, FTP links and mailto addresses but not files. I am managing to produce output like this: <a...
3
2208
rajiv07
by: rajiv07 | last post by:
Hi to all, I have a script to list the file names in a directory .When i run this script locally (command prompt) it displays the exact file name (even though the file name has two spaces).But i upload the script into server (Browser) it shows trimmed file names(single space for double spaces). I have checked both IE and Firefox it shows only single space file name instead on double space file name. Is it browser problem. ...
0
8305
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8823
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8603
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7320
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6163
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4151
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4301
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1944
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.