Notepad bug makes it unusable


G

Guest

I was referred to this newsgroup by the thread at:

http://www.microsoft.com/office/com...&p=1&tid=3a24da26-6c3a-41c7-b082-e55b312ee180

You'll find details of the bug there, but basically, if you enter a line the
wraps then save the file, line break characters will be added and the line
will no longer be one wrapped line. It will be multiple lines. Copying and
pasting what had been a single line will cause it to be truncated when
pasted, for example, in a browser address bar. Copying and pasting commands
that had these line breaks added will break the command when pasted at the
command line. I can't use Notepad anymore.
 
Ad

Advertisements

P

Pegasus \(MVP\)

Barry said:
I was referred to this newsgroup by the thread at:

http://www.microsoft.com/office/com...&p=1&tid=3a24da26-6c3a-41c7-b082-e55b312ee180

You'll find details of the bug there, but basically, if you enter a line
the
wraps then save the file, line break characters will be added and the line
will no longer be one wrapped line. It will be multiple lines. Copying and
pasting what had been a single line will cause it to be truncated when
pasted, for example, in a browser address bar. Copying and pasting
commands
that had these line breaks added will break the command when pasted at the
command line. I can't use Notepad anymore.

I cannot see any evidence of a bug that causes line breaks to be added.
If you think that they exist then I suggest you post a step-by-step
recipe that others can follow to confirm (or otherwise) your suspicon.
Don't rely on someone else's unconformed reports - try it for yourself,
then show us!
 
G

Guest

I was the bug reporter in the other thread. I _have_ tried it.

To reproduce it:

1. Open http://www.polisource.com/misc/notepad-bug.txt in Notepad, with
"word wrap" checked, when the Notepad window isn't full-screen size (mine is
about half the size of my monitor), then maximize Notepad so it's full-screen
size and you'll see the text spread out to fit the width of the screen. (this
step is just to show that the line is a single line that wraps as such).

2. Make the screen smaller again and save the file, then maximize again, and
you'll see that the text won't be spread out.

This shows that the document on the screen changes when it's saved. Line
breaks are added.
 
P

Pegasus \(MVP\)

Barry said:
I was the bug reporter in the other thread. I _have_ tried it.

To reproduce it:

1. Open http://www.polisource.com/misc/notepad-bug.txt in Notepad, with
"word wrap" checked, when the Notepad window isn't full-screen size (mine
is
about half the size of my monitor), then maximize Notepad so it's
full-screen
size and you'll see the text spread out to fit the width of the screen.
(this
step is just to show that the line is a single line that wraps as such).

2. Make the screen smaller again and save the file, then maximize again,
and
you'll see that the text won't be spread out.

This shows that the document on the screen changes when it's saved. Line
breaks are added.

I tried to follow your recipe as closely as I could even though you
omitted some essential details, e.g. when LineWrap should be
turned on and when it should be turned off, or when the file should
be saved/closed/reopened. I left LineWrap on at all times.

I was unable to reproduce your findings. Each time I expanded
the width of the screen the lines expanded to whatever the
current window could accommodate.

Your conclusion "This shows that the document on the screen
changes when it's saved. Line breaks are added." lacks
substance. To demonstrate that line breaks are added, you need
to examine the file with a binary viewer / editor. If you don't
have one, use debug.exe. I checked the file with such an editor -
there were no extra line breaks added.

Lastly it is highly speculative to suggest a bug when you base
your conclusion on an observation on one single machine. You
should test your theory at the very least on two completely
independent machines but preferably on three or four. For
all we know, it might be your own machine that has a bug, not
notepad.exe.
 
B

Bill Sharpe

Pegasus said:
I tried to follow your recipe as closely as I could even though you
omitted some essential details, e.g. when LineWrap should be
turned on and when it should be turned off, or when the file should
be saved/closed/reopened. I left LineWrap on at all times.

I was unable to reproduce your findings. Each time I expanded
the width of the screen the lines expanded to whatever the
current window could accommodate.

Your conclusion "This shows that the document on the screen
changes when it's saved. Line breaks are added." lacks
substance. To demonstrate that line breaks are added, you need
to examine the file with a binary viewer / editor. If you don't
have one, use debug.exe. I checked the file with such an editor -
there were no extra line breaks added.

Lastly it is highly speculative to suggest a bug when you base
your conclusion on an observation on one single machine. You
should test your theory at the very least on two completely
independent machines but preferably on three or four. For
all we know, it might be your own machine that has a bug, not
notepad.exe.
I can reproduce Barry's visual results on my machine, but the file size
is identical(297 bytes) when I save the file with WordWrap on (and four
lines showing) or WordWrap off (with one line showing). Frankly I don't
see this as making Notepad unusable for several reasons:
1. I don't use Notepad often.
2. I leave WordWrap on all the time in Notepad.
3. I don't resize the Notepad window.
4. As Pegasus points out, there are no line break characters added to
the file.

Bill
 
P

Pegasus \(MVP\)

Bill Sharpe said:
I can reproduce Barry's visual results on my machine, but the file size is
identical(297 bytes) when I save the file with WordWrap on (and four lines
showing) or WordWrap off (with one line showing). Frankly I don't see this
as making Notepad unusable for several reasons:
1. I don't use Notepad often.
2. I leave WordWrap on all the time in Notepad.
3. I don't resize the Notepad window.
4. As Pegasus points out, there are no line break characters added to the
file.

Bill

Your report suggests that the ***visual*** line breaks may be
repositioned after the notepad window is resized. The OP's
claim that line breaks are inserted into the file must have been
based on this observation only rather than on a close examination
of the file itself.
 
Ad

Advertisements

G

Guest

The line breaks aren't added to the file, but they can be copied to the
clipboard from the text in Notepad. Resizing isn't necessary for the unwanted
line breaks to be added. All you have to do is save the document and then if
you copy the text to the clipboard, the line breaks will be copied too. I
just mentioned resizing Notepad as an easy way to see the changing line
length.

I've tried copying text from Notepad after saving the file and noticed the
full line couldn't be pasted in IE's address bar because it was truncated at
the line breaks that Notepad added. I've also tried copying commands and
pasting them in a console window and they appeared as more than one line and
didn't function as commands.

:
Frankly I don't
 
H

HeyBub

Barry said:
The line breaks aren't added to the file, but they can be copied to
the clipboard from the text in Notepad. Resizing isn't necessary for
the unwanted line breaks to be added. All you have to do is save the
document and then if you copy the text to the clipboard, the line
breaks will be copied too. I just mentioned resizing Notepad as an
easy way to see the changing line length.

Well, duh!

You're not copying the FILE to the clipboard, you're copying what's
displayed on Notepad's screen. The screen has line breaks (else you'd have
to scroll all over the place).
 
P

Pegasus \(MVP\)

Barry said:
The line breaks aren't added to the file, but they can be copied to the
clipboard from the text in Notepad. Resizing isn't necessary for the
unwanted
line breaks to be added. All you have to do is save the document and then
if
you copy the text to the clipboard, the line breaks will be copied too. I
just mentioned resizing Notepad as an easy way to see the changing line
length.

I've tried copying text from Notepad after saving the file and noticed the
full line couldn't be pasted in IE's address bar because it was truncated
at
the line breaks that Notepad added. I've also tried copying commands and
pasting them in a console window and they appeared as more than one line
and
didn't function as commands.

That's something completely different than what you posted
in your previous "step-by-step" procedure. When chasing
bugs you need to be
a) consistent and
b) comprehensive

I can't detect much of either in your notes.
 
G

Guest

In my step by step I wrote "This shows that the document on the screen
changes when it's saved. Line breaks are added." Maybe you were confused by
my top post which said "basically, if you enter a line the wraps then save
the file, line break characters will be added and the line will no longer be
one wrapped line" but that wasn't in my "step-by-step procedure."

You have an attitude problem. You should go away.
 
V

VanguardLH

Barry said:
I was the bug reporter in the other thread. I _have_ tried it.

To reproduce it:

1. Open http://www.polisource.com/misc/notepad-bug.txt in Notepad,
with
"word wrap" checked, when the Notepad window isn't full-screen size
(mine is
about half the size of my monitor), then maximize Notepad so it's
full-screen
size and you'll see the text spread out to fit the width of the
screen. (this
step is just to show that the line is a single line that wraps as
such).

2. Make the screen smaller again and save the file, then maximize
again, and
you'll see that the text won't be spread out.

This shows that the document on the screen changes when it's saved.
Line
breaks are added.


That is merely a formatting issue regarding line-wrap mode. When you
reduce the size of the window, Notepad breaks the long line at word
boundaries. When you maximize the window, Notepad doesn't know how to
repaste the lines back together - but that is ONLY in its *view*
inside the window. When you maximize but the word wrap doesn't
repaste the lines together, save the file while it looks like the
lines are truncated. Two things happen: as soon as you do the save,
Notepad displays the saved file and word wrapping uses the full width
of each line in the maximized window; and, when you open the saved
file, you'll see there was no truncation.

Notepad knows how to perform line wrapping when the window is reduced
in size. It doesn't know how to do UNWRAPPING when the window is
enlarged. Notepad is not a WYSIWYG editor with all of those features.
Don't expect line wrapping to magically UNWRAP a line when you enlarge
a view of a document by increasing the window size in Notepad. No
linebreaks got added to the saved file. Just because YOU see
whitespace inside of Notepad's window doesn't mean it is there in the
file.

Just turn off word wrap and turn it back on. Voila, now the line that
got elongated in the 1-line view with word wrap off will get
automatically parsed when you turn word wrap back on. Notepad only
does line wrapping when the window is reduced in size if a view has
been captured, like when doing the save. It tries to do the line
wrapping otherwise but it is JUST A SIMPLE PLAIN-TEXT EDITOR, not a
word processor.

There are other text file editors that do better on the line wrapping.
Some even add so many features that eventually they become more like
word processing programs. Some are just very potent text editors,
like VIM. Of course, if all you want is a very simple line editor,
you could use edlin.exe. It still exists (well, up to Windows XP).
 
Ad

Advertisements

P

Pegasus \(MVP\)

Barry said:
In my step by step I wrote "This shows that the document on the screen
changes when it's saved. Line breaks are added." Maybe you were confused
by
my top post which said "basically, if you enter a line the wraps then save
the file, line break characters will be added and the line will no longer
be
one wrapped line" but that wasn't in my "step-by-step procedure."

You have an attitude problem. You should go away.

I agree, I have an attitude problem when I encounter a bug chaser
with an unsystematic and inconsistent approach.
 
G

Guest

VanguardLH said:
Just turn off word wrap and turn it back on. Voila, now the line that
got elongated in the 1-line view with word wrap off will get
automatically parsed when you turn word wrap back on.

Good, then Microsoft should be able to fix the bug easily by implementing
the toggle programmatically. It should be in the next Windows update.
 
V

VanguardLH

in message
Good, then Microsoft should be able to fix the bug easily by
implementing
the toggle programmatically. It should be in the next Windows
update.


Guess you missed the point that Notepad is not a WYSIWYG word
processor. Have you seen Microsoft modify edlin.exe for the
console-mode text editor in 15 years, or more?

Since the content of the saved file is ignorant to any of your choices
regarding the *display* of wrapped lines, the program is successfully
and properly editing the files. It is a text editor. That's it. If
you want something more, go use some 3rd party editor. There are LOTS
of them, like VIM, and a great number of them are free, like VIM (also
called gvim).

Or choose to be obstinate and continue using a product that edits the
file correctly but doesn't do just what YOU want regarding unwrapping
of lines which is irrelevant in plain-text files, anyway.
 
G

Guest

It doesn't do what people would expect it to do, and by "people" I mean
everyone. It adds characters and messes up some copy/pastes and gets the
display wrong. The fix is easy. Such a problem would be fixed in any
commercial product that's sold seperetely and even in donationware that's
still supported. Essentially, Microsoft is no longer supporting Notepad if
they don't even lift a finger to fix this.
 
M

M.I.5¾

Barry said:
I was the bug reporter in the other thread. I _have_ tried it.

To reproduce it:

1. Open http://www.polisource.com/misc/notepad-bug.txt in Notepad, with
"word wrap" checked, when the Notepad window isn't full-screen size (mine
is
about half the size of my monitor), then maximize Notepad so it's
full-screen
size and you'll see the text spread out to fit the width of the screen.
(this
step is just to show that the line is a single line that wraps as such).

2. Make the screen smaller again and save the file, then maximize again,
and
you'll see that the text won't be spread out.

This shows that the document on the screen changes when it's saved. Line
breaks are added.

I followed your instructions and although it fails to expand to fill the
screen. If you close notepad and then reopen the saved file, it expands to
fill the width if changed, thus showing that no linebreaks were saved.
 
Ad

Advertisements

M

M.I.5¾

Barry said:
It doesn't do what people would expect it to do, and by "people" I mean
everyone. It adds characters and messes up some copy/pastes and gets the
display wrong. The fix is easy. Such a problem would be fixed in any
commercial product that's sold seperetely and even in donationware that's
still supported. Essentially, Microsoft is no longer supporting Notepad if
they don't even lift a finger to fix this.

No, you are missing the point. Notepad doesn't add anything to the test
file that it saves. The only line breaks in the saved fiel are the ones
that you specifically add when entering text.

Microsoft don't need to fix it, 'cause it ain't broken.
 
M

M.I.5¾

Barry said:
The line breaks aren't added to the file, but they can be copied to the
clipboard from the text in Notepad. Resizing isn't necessary for the
unwanted
line breaks to be added. All you have to do is save the document and then
if
you copy the text to the clipboard, the line breaks will be copied too. I
just mentioned resizing Notepad as an easy way to see the changing line
length.

I've tried copying text from Notepad after saving the file and noticed the
full line couldn't be pasted in IE's address bar because it was truncated
at
the line breaks that Notepad added. I've also tried copying commands and
pasting them in a console window and they appeared as more than one line
and
didn't function as commands.

The line breaks seem to be temporary because they can be cancelled by
deselecting wordwrap and then selecting it again. The whole line can then
be cut and pasted without any problems.
 
P

Pegasus \(MVP\)

M.I.5¾ said:
No, you are missing the point. Notepad doesn't add anything to the test
file that it saves. The only line breaks in the saved fiel are the ones
that you specifically add when entering text.

Microsoft don't need to fix it, 'cause it ain't broken.

I think you're wasting your time. Barry is on a mission: He believes
that he has found a bug and he will not rest until everyone agrees
with him that Microsoft is doing a lousy job by not fixing it for him.
There is no point in confusing him with facts.
 
Ad

Advertisements

J

John John

M.I.5¾ said:
I followed your instructions and although it fails to expand to fill the
screen. If you close notepad and then reopen the saved file, it expands to
fill the width if changed, thus showing that no line breaks were saved.

That is because Barry "jumped the gun", no hard returns are added to the
file, the file is absolutely unchanged. What is happening is that the
WYSIWYG word wrap has a hiccup, Barry could have figured that out by
simply re-wrapping the text.

The subject header that Barry chose "Notepad bug makes it unusable" is
rather amusing, it doesn't make Notepad unusable, but to give credit to
Barry it could be classed as a bug, but only a minor bug, not one that
makes Notepad unusable. Notepad is still a supported product, over the
years it has had several revisions and changes made to it. Notepad
ships with all Windows versions and being that XP is still supported
Microsoft should address the issue. A lot of people copy from Notepad
to other applications and I can see where this issue could cause
problems for those who are unaware of this Notepad peculiarity.

I vote that this is a minor Notepad bug that Microsoft should fix.
Barry should file a bug report: http://support.microsoft.com/gp/contactbug/

John
 

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

Similar Threads


Top