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? 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.
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.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 -
|
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";
|
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
|
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...
|
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>
| |
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...
|
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...
|
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...
|
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.
...
|
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,...
|
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...
| |
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,...
|
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |