Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Notepad bug makes it unusable

49 views
Skip to first unread message

Barry

unread,
Oct 19, 2007, 12:43:01 PM10/19/07
to
I was referred to this newsgroup by the thread at:

http://www.microsoft.com/office/community/en-us/default.mspx?&guid=&sloc=en-us&dg=microsoft.public.office.misc&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.

Pegasus (MVP)

unread,
Oct 19, 2007, 1:07:59 PM10/19/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:017E7847-3DBC-424E...@microsoft.com...

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!


Barry

unread,
Oct 19, 2007, 1:51:01 PM10/19/07
to
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.

Pegasus (MVP)

unread,
Oct 19, 2007, 2:38:13 PM10/19/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:48B2E3B1-F6FC-4763...@microsoft.com...

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.


Bill Sharpe

unread,
Oct 19, 2007, 4:06:57 PM10/19/07
to
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

Pegasus (MVP)

unread,
Oct 19, 2007, 4:15:30 PM10/19/07
to

"Bill Sharpe" <wfsn...@adelphia.net> wrote in message
news:u7djRuoE...@TK2MSFTNGP04.phx.gbl...

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.


Barry

unread,
Oct 19, 2007, 5:21:01 PM10/19/07
to
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.

HeyBub

unread,
Oct 19, 2007, 5:56:12 PM10/19/07
to
Barry wrote:
> 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).


Pegasus (MVP)

unread,
Oct 19, 2007, 6:09:11 PM10/19/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:560318F7-A737-454F...@microsoft.com...

> 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.


Barry

unread,
Oct 19, 2007, 6:55:02 PM10/19/07
to
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.

VanguardLH

unread,
Oct 19, 2007, 7:05:39 PM10/19/07
to
"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:48B2E3B1-F6FC-4763...@microsoft.com...


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).

Pegasus (MVP)

unread,
Oct 20, 2007, 2:27:03 AM10/20/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:B434AC41-A33A-4BB5...@microsoft.com...

> 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.


Barry

unread,
Oct 20, 2007, 3:13:00 AM10/20/07
to
"VanguardLH" wrote:

> 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.

VanguardLH

unread,
Oct 20, 2007, 10:40:45 PM10/20/07
to
"Barry" wrote in message
news:17342590-B47F-407F...@microsoft.com...


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.

Barry

unread,
Oct 21, 2007, 1:13:00 PM10/21/07
to
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.I.5พ

unread,
Oct 22, 2007, 5:54:46 AM10/22/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:48B2E3B1-F6FC-4763...@microsoft.com...

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.


M.I.5¾

unread,
Oct 22, 2007, 6:16:38 AM10/22/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:3E1D125A-CA7A-42EA...@microsoft.com...

> 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.I.5¾

unread,
Oct 22, 2007, 6:21:31 AM10/22/07
to

"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:560318F7-A737-454F...@microsoft.com...

> 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.


Pegasus (MVP)

unread,
Oct 22, 2007, 6:22:15 AM10/22/07
to

"M.I.5¾" <no....@no.where.NO_SPAM.co.uk> wrote in message
news:471c74d3$1...@glkas0286.greenlnk.net...

>
> "Barry" <Ba...@discussions.microsoft.com> wrote in message
> news:3E1D125A-CA7A-42EA...@microsoft.com...
>> 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.
>

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.


John John

unread,
Oct 22, 2007, 8:28:41 AM10/22/07
to
M.I.5ž wrote:

> 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

Barry

unread,
Oct 22, 2007, 10:56:00 AM10/22/07
to
I didn't even know you could report a bug. Thanks for the link.

Notepad is so unusable for me that I wasn't trying to figure if the same
goes for most people. I use Notepad to save helpful command prompt commands
and for links with associated notes. For example, I may have a link to a
website and to my local copy of it and a excerpt from it, then a line of
hyphens and another similar entry. I'll update it once in a while, save it,
and want to copy one of the links to the address bar and find it's truncated.

VanguardLH

unread,
Oct 22, 2007, 10:39:20 PM10/22/07
to
"Barry" <Ba...@discussions.microsoft.com> wrote in message
news:3E1D125A-CA7A-42EA...@microsoft.com...

> 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.


Sorry, I'm an alien from Alpha Centauri so I don't qualify as Earth
"people". I have yet to be bothered by this visual-only artifact.

I have worked at several computer-industry companies (hardware or
software producers) with lots of developer and QA folks and never
heard anyone there complain about this artifact. They must all be
aliens, too.

Stop confusing what is the OS that you purchase and all the fluffware
that comes included with it. Nowadays even the Linux distros come
riddled with fluffware, too.

M.I.5¾

unread,
Oct 23, 2007, 2:53:18 AM10/23/07
to

"Pegasus (MVP)" <I....@fly.com> wrote in message
news:%23IQOsVJ...@TK2MSFTNGP03.phx.gbl...

I have to admit, that I was starting to wonder if the OP was some kind of
troll.


0 new messages