Why multiple spaces are replaced with one

S

Saeed

There must be something in this file's header that tells it to do
that.
can someone tell me what needs to change so multiple spaces come out
as what is been typed

<html xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:w="urn:schemas-microsoft-com:eek:ffice:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html;
charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="saeed-8-_files/filelist.xml">
<title>BBB LABELS Labels</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText>
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
</w:WordDocument>
</xml><![endif]--><!--[if gte mso 9]><xml>
<w:LatentStyles DefLockedState="false" LatentStyleCount="156">
</w:LatentStyles>
</xml><![endif]-->
<style>
<!--
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
p
{mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
mso-pagination:widow-orphan;
font-size:12.0pt;
font-family:"Times New Roman";
mso-fareast-font-family:"Times New Roman";}
@page Section1
{size:612.0pt 792.0pt;
margin:72.0pt 90.0pt 72.0pt 90.0pt;
mso-header-margin:35.4pt;
mso-footer-margin:35.4pt;
mso-paper-source:0;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 10]>
<style>
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-parent:"";
mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
mso-para-margin:0cm;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:10.0pt;
font-family:"Times New Roman";
mso-ansi-language:#0400;
mso-fareast-language:#0400;
mso-bidi-language:#0400;}
</style>
<![endif]--><!--[if gte mso 9]><xml>
<u1:shapedefaults u2:ext="edit" spidmax="3074"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
<u3:shapelayout u4:ext="edit">
<u3:idmap u4:ext="edit" data="1"/>
</u3:shapelayout>
</xml><![endif]-->
</head>

<body lang=EN-US style='tab-interval:36.0pt'>

<div class=Section1>




<p class=MsoNormal><b style='mso-bidi-font-weight:normal'>&nbsp;</b></
p>

<p class=MsoNormal style='line-height:150%'><b><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Mr Singapore Corp Admin
2FA<u6:p></u6:p></span></b><b
style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Corporate 01074 000038505<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Address Line 2 000038506<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Address Line 3 000038507<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Address Line 4 000038508<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Address Line 5 000038509<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Address Line 6 000038510<u6:p></
u6:p></span></p>


<p class=MsoNormal><b style='mso-bidi-font-weight:normal'>&nbsp;</b></
p>

<p class=MsoNormal style='line-height:150%'><b><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'><u6:p></u6:p></span></b><b
style='mso-bidi-font-weight:normal'><o:p></o:p></b></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>User ID "64540259" test for
2FA<u6:p></u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Line "2" - has 60
characters<u6:p></u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-
family:Tahoma'>123456789112345678921234567893123456789412345678951234567896<u6:p></
u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>The mytiscal ]line 4[ below )
( has qwerty stuff<u6:p></u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>`1234567890-=[]\;',./-!@#$%^&*()_+
{}|:""<>?<u6:p></u6:p></span></p>

<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'>Just some text with
lots of spaces<u6:p></u6:p></span></p>
<p class=MsoNormal style='line-height:150%'><span style='font-size:
8.0pt;
line-height:150%;font-family:Tahoma'> <u6:p></u6:p></span></p>
 
C

Chris F.A. Johnson

There must be something in this file's header that tells it to do
that.

That is what a browser is supposed to do.
can someone tell me what needs to change so multiple spaces come out
as what is been typed

Put it in a said:
<meta name=Generator content="Microsoft Word 11">

Don't expect to get a good web page out of MS Word. It creates
HTML-coded documents, not web pages.
 
D

dorayme

Saeed said:
There must be something in this file's header that tells it to do
that.
can someone tell me what needs to change so multiple spaces come out
as what is been typed

Perhaps the PRE element might be of interest to you?
 
A

Ari Heino

Saeed kirjoitti seuraavasti:
can someone tell me what needs to change so multiple spaces come out
as what is been typed

Don't multiple &nbsp; also stay untouched? They have, of course their
own meaning, non-breaking space, also. Thus they might break the natural
flow of text. <pre> might well be the best option. That need some css if
monospace font is not desired.

Perhaps an example of what you want could tell us more.
 
J

Jonathan N. Little

Saeed said:
There must be something in this file's header that tells it to do
that.
can someone tell me what needs to change so multiple spaces come out
as what is been typed

"Why multiple spaces are replaced with one"

Because in HTML whitespace is suppose to collapse, except for text
within the PRE element if not styled otherwise. Or when using entity
&nbsp; Or when styling element with CSS property 'white-space: pre'

<html xmlns:eek:="urn:schemas-microsoft-com:eek:ffice:eek:ffice"
xmlns:w="urn:schemas-microsoft-com:eek:ffice:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html;
charset=windows-1252">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 11">
<meta name=Originator content="Microsoft Word 11">
<link rel=File-List href="saeed-8-_files/filelist.xml">
<title>BBB LABELS Labels</title>
<!--[if gte mso 9]><xml>
<w:WordDocument>
<w:SpellingState>Clean</w:SpellingState>
<w:GrammarState>Clean</w:GrammarState>
<w:ValidateAgainstSchemas/>
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid>
<w:IgnoreMixedContent>false</w:IgnoreMixedContent>

<snip MS junk>

Do not use Word to make HTML documents, it is a word processor not a web
authoring tool and whatever it spews out will cause you great
frustrations and disappointment. Either learn a little bit of HTML or
hire someone to do it for you.
 
A

Athel Cornish-Bowden

"Why multiple spaces are replaced with one"

Because in HTML whitespace is suppose to collapse, except for text
within the PRE element if not styled otherwise. Or when using entity
&nbsp;

I seem to recall years ago (around 2000) someone knowledgeable (maybe
Jukka) said on comp.infosystems.www.authoring.html that multiple &nbsp;
was undefined in HTML, and that browsers were not required to introduce
more than one space when parsing &nbsp;&nbsp;&nbsp; etc. However, all
browsers that I have tested seem to do what authors expect with such
constructions.
 
A

Allodoxaphobia

I seem to recall years ago (around 2000) someone knowledgeable (maybe
Jukka) said on comp.infosystems.www.authoring.html that multiple &nbsp;
was undefined in HTML, and that browsers were not required to introduce
more than one space when parsing &nbsp;&nbsp;&nbsp; etc. However, all
browsers that I have tested seem to do what authors expect with such
constructions.

Ah, but... Use the pattern: &nbsp; &nbsp; &nbsp; &nbsp; -- usw, etc

As for the OP, go ahead -- make it look good (sic) in _your_ browser.
Many visitors to your web site will think it looks like crap.

Jonesy
 
J

Jukka K. Korpela

It may have been me. In any case, it _is_ very explicitly undefined: they
even say it is undefined.

"This specification does not indicate the behavior, rendering or otherwise,
of space characters other than those explicitly identified here as white
space characters. For this reason, authors should use appropriate elements
and styles to achieve visual formatting effects that involve white space,
rather than space characters."
http://www.w3.org/TR/html401/struct/text.html#h-9.1

The no-break space character is not among those defined as white space
characters. Note however that clause 9.3.2 says: "Sometimes authors may want
to prevent a line break from occurring between two words. The &nbsp; entity
(  or  ) acts as a space where user agents should not cause a line
break." This is sloppy - the HTML spec really ain't no _standard_ - since it
does not mention the no-break space character itself, but it is surely meant
to be treated the same way as the notations denoting it.

Being undefined even means that they make introduce any amount of space.

If you are writing a browser, it is reasonable to treat &nbsp; as a
non-collapsible, non-stretchable (in justification) space with the same
width as a normal space normally has - just because this is the usual way
and shouldn't normally harm anyone. If you are writing a web page, it is not
reasonably to rely on browsers doing such things if you have an option, and
you normally have. It's not in the specs, it's not obvious and trivial, and
it's easy to miss some finer points or the whole point when you are in a
hurry, trying to launch a brand new minibrowser for some special reason.
Ah, but... Use the pattern: &nbsp; &nbsp; &nbsp; &nbsp; -- usw, etc

And what would _that_ help? It's equally undefined what the width will be,
and you're now taking more chances since this is more complicated to
implementors than a simple sequence of no-break spaces.

The excuse "but I don't know CSS" is _so_ lame.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,738
Latest member
JinaMacvit

Latest Threads

Top