473,503 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Again: When plain text page is treated as HTML

Hi All

Sorry for reposting...the entries of the post from 11/23/2005 by Eric
Lindsay have been removed from the server already and I am seeing only
the header.

So, I have the problem of including via SSI a plain text fixed width
table (separated by spaces) which of course gets treated as html when
doing that. I would like to have the blanks (and line returns) stay in
the file and then I could use courier new to display it properly. I
tried temporarily in the html file to turn off html </html> and turn it
on again afterwards, but that was purely experimental...and did not work.

Any suggestions very welcome.

Thanks Toby
Jan 12 '06 #1
7 1695
Deciding to do something for the good of humanity, <to*****@hotpop.com>
spouted in comp.infosystems.www.authoring.html:
I would like to have the blanks (and line returns) stay in
the file
<pre>
....included file...
</pre>
and then I could use courier new to display it properly.
Browsers display <pre> in a monospace font by default.
I
tried temporarily in the html file to turn off html </html> and turn it
on again afterwards, but that was purely experimental...and did not work.


Understandably. You can't "turn off" HTML. I suggest you have a good
look at the info on w3.org - no offence, but you seem to lack
understanding of some of the basic concepts behind HTML.

--
Mark Parnell
================================================== ===
Att. Google Groups users - this is your last warning:
http://www.safalra.com/special/googlegroupsreply/
Jan 12 '06 #2
On Wed, 11 Jan 2006, to*****@hotpop.com wrote:
So, I have the problem of including via SSI a plain text fixed width
table (separated by spaces) which of course gets treated as html
when doing that.
In general, you will need to pass the content through a filter which
turns any markup-significant characters into corresponding &-notation
(numerical character references &#number; , or character entities &lt;
, &amp; etc.).

The result can then be clapped in <pre>...</pre>, if the results of
that are acceptable to you.

The HTML specification warns against using TAB characters for
positioning, so, if your original contains TAB characters, then your
filter would be advised to have some kind of algorithm for converting
them into what you consider to be an appropriate number of ordinary
spaces.

Whether this filtering is really suitable for doing at server time via
an SSI is an implementation question - you might be better advised to
perform the filtering at the time that these snippets are created,
rather than at the time they are served-out.
I would like to have the blanks (and line returns) stay in the file
That's what the <pre> markup is intended for, after all.
and then I could use courier new to display it properly.
In a web context, you'll use whatever monospaced font the *reader* has
for this purpose: with CSS you can make a proposal, which the reader's
browser can implement or not, depending on the available fonts and on
its user settings. Just a routine caution that MS's supply of
monospaced fonts in their OSes seem to be particularly poor as regards
character repertoire[1].
I tried temporarily in the html file to turn off html </html> and
turn it on again afterwards,


Your mental model of HTML is adrift. Tags aren't there to "turn on or
off", but to mark-up element content. On a page which is sent as
text/html, *all* of your substantive content has to be within a <body>
element which itself is within an <html> element: you don't have any
discretion in that regard (in HTML, as opposed to XHTML, the *markup*
for those elements can be implicit rather than explicit, but the
*elements* are there in either case).

The old <plaintext> markup of early pre-SGML HTML doesn't really exist
in current versions (you might find browsers which still implement it,
but that's no real excuse for using it in present-day work).

have fun

[1] some discussion in my page
athttp://ppewww.ph.gla.ac.uk/~flavell/charset/browsers-fonts.html#Monospaced
Jan 12 '06 #3
In our last episode,
<dq**********@news.Stanford.EDU>,
the lovely and talented to*****@hotpop.com
broadcast on comp.infosystems.www.authoring.html:
Hi All Sorry for reposting...the entries of the post from 11/23/2005 by Eric
Lindsay have been removed from the server already and I am seeing only
the header. So, I have the problem of including via SSI a plain text fixed width
table (separated by spaces) which of course gets treated as html when
doing that. I would like to have the blanks (and line returns) stay in
the file and then I could use courier new to display it properly. I
tried temporarily in the html file to turn off html </html> and turn it
on again afterwards, but that was purely experimental...and did not work.
Doesn't

<pre>
<!--#include virtual whatever your server wants here -->
</pre>

work?
Any suggestions very welcome. Thanks Toby

--
Lars Eighner us****@larseighner.com http://www.larseighner.com/
Dynamic linking error: Your mistake is now everywhere.
Jan 12 '06 #4
JRS: In article <Pi******************************@ppepc62.ph.gla.a c.uk>
, dated Thu, 12 Jan 2006 11:56:49 local, seen in news:comp.infosystems.w
ww.authoring.html, Alan J. Flavell <fl*****@ph.gla.ac.uk> posted :

The result can then be clapped in <pre>...</pre>, if the results of
that are acceptable to you.

The HTML specification warns against using TAB characters for
positioning, so, if your original contains TAB characters, then your
filter would be advised to have some kind of algorithm for converting
them into what you consider to be an appropriate number of ordinary
spaces.


My site contains at present 1185 TABs, mostly in PRE; are there many
browsers that don't display tabs in PRE as the usual 1..8 spaces?

I don't recall any tester or validator giving as much as a warning for
any of them.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
For news:borland.*, use their server newsgroups.borland.com ; but first read
Guidelines <URL:http://www.borland.com/newsgroups/guide.html> ff. with care.
Jan 13 '06 #5
On Fri, 13 Jan 2006, Dr John Stockton wrote, quoting me:
The HTML specification warns against using TAB characters for
positioning,
[...]
My site contains at present 1185 TABs, mostly in PRE; are there many
browsers that don't display tabs in PRE as the usual 1..8 spaces?
I can only suggest that the Hon. Usenaut draws his own conclusion from
what the HTML spec says. Section 9.3.4 seems to contain the point:

http://www.w3.org/TR/REC-html40/stru....html#edef-PRE

although there are other places where white-space issues are mentioned
for one reason or another.
I don't recall any tester or validator giving as much as a warning for
any of them.


There's a lot of detail in the HTML4 spec which I've never seen a
linter/checker drawing attention to. A "validator", in the strict
sense, would have no business mentioning it, of course, since it's not
an SGML/XML syntax issue.

best
Jan 13 '06 #6
to*****@hotpop.com wrote:

Hi All

Sorry for reposting...the entries of the post from 11/23/2005 by Eric
Lindsay have been removed from the server already and I am seeing only
the header.

So, I have the problem of including via SSI a plain text fixed width
table (separated by spaces) which of course gets treated as html when
doing that. I would like to have the blanks (and line returns) stay in
the file and then I could use courier new to display it properly. I
tried temporarily in the html file to turn off html </html> and turn it
on again afterwards, but that was purely experimental...and did not work.

Any suggestions very welcome.

Thanks Toby


If the entire page is plain text, why not serve it as an ASCII text
page? The extension would be .txt. The MIME type is express
(e.g., in an .htaccess file) as:
text/plain asc txt

Actually, an ASCII text file without any <!DOCTYPE> and <HTML> tags
and without any extension is served by an Apache server as
text/plain. I have a copy of my ISP's default MIME type list. I
just now uploaded the file to
<http://www.rossde.com/test/MIMEtypes>, without any extension for
you to view. You can see that the use of tabs to create columns
for the extensions is preserved. However, I would guess that
different browsers might have different default tab-stops.

--

David E. Ross
<http://www.rossde.com/>

Concerned about someone (e.g., Pres. Bush) snooping
into your E-mail? Use PGP.
See my <http://www.rossde.com/PGP/>
Jan 14 '06 #7
JRS: In article <Pi******************************@ppepc62.ph.gla.a c.uk>
, dated Fri, 13 Jan 2006 18:49:51 local, seen in news:comp.infosystems.w
ww.authoring.html, Alan J. Flavell <fl*****@ph.gla.ac.uk> posted :
On Fri, 13 Jan 2006, Dr John Stockton wrote, quoting me:
>The HTML specification warns against using TAB characters for
>positioning,

[...]
My site contains at present 1185 TABs, mostly in PRE; are there many
browsers that don't display tabs in PRE as the usual 1..8 spaces?


I can only suggest that the Hon. Usenaut draws his own conclusion from
what the HTML spec says. Section 9.3.4 seems to contain the point:

http://www.w3.org/TR/REC-html40/stru....html#edef-PRE


I was not asking about the HTML spec (after all, your previous article
was clear enough); I was asking about what browsers actually do.

Only if a significant proportion of viewers get a significantly degraded
view can abandoning an otherwise rather effective construct be
worthwhile.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
<URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
<URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
Jan 14 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
4149
by: J. Alan Rueckgauer | last post by:
Hello. I'm looking for a simple way to do the following: We have a database that serves-up content to a website. Some of those items are events, some are news articles. They're stored in the...
14
6839
by: Akseli Mäki | last post by:
Hi, Hopefully this is not too much offtopic. I'm working on a FAQ. I want to make two versions of it, plain text and HTML. I'm looking for a tool that will make a plain text doc out of the...
2
1761
by: Mike Bridge | last post by:
Is there any way to get Internet explorer to treat a text/plain .net page as plain text using asp.net? It seems like IE doesn't trust text/plain as a mime type, and so it (ironically) displays it...
8
3035
by: Doominato | last post by:
good day, I was just wondering how can I download a web page as plain text from a certain web site. I have tried to use the OpenURL() method from INET control in my VB.NET app, but it returns...
10
3453
by: Eric Lindsay | last post by:
This may be too far off topic, however I was looking at this page http://www.hixie.ch/advocacy/xhtml about XHTML problems by Ian Hickson. It is served as text/plain, according to Firefox...
2
2863
by: Tim_Mac | last post by:
hi, i have a tricky problem and my regex expertise has reached its limit. i have read other posts on this newsgroup that pull out the plain text from a html string, but that won't work for me...
0
1861
by: Rey | last post by:
Howdy all. Am using visual web developer 2005 (vb), xp pro sp2. In testing of the system.net.mail to send email from an aspx page where I'm pulling the email contents from a textbox, find that...
5
2630
by: John Nagle | last post by:
This, which is from a real web site, went into BeautifulSoup: <param name="movie" value="/images/offersBanners/sw04.swf?binfot=We offer fantastic rates for selected weeks or days!!&blinkt=Click...
1
3877
by: Billy | last post by:
Hi All, I'm attempting to use the MapNetworkDrive <snippedbelow from entire code below with very poor performance results. Basically, I have very small 73kb text files that are rewritten daily...
0
7192
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7261
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,...
1
6974
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...
0
7445
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...
1
4991
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...
0
3158
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...
0
3147
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1492
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
369
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.