PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Why does Notepad NOT open a specific text file correctly?

 
 
Robert Macy
Guest
Posts: n/a
 
      9th Aug 2006
Is this a bug?

Both files started out as Matlab like data files saved in ascii mode,
one named f.txt, the other g.txt Both files in their original state
read properly. Both files consist of all printable characters with
header lines [each header line begins with the character #] followed by
simple integer values, separated by spaces. I needed to remove the
header lines, so I opened each using Notepad, and deleted the five
header lines, leaving only the integer values.

The first file reads after the header lines are removed with NO
problem. The second, and similar file, does not read correctly again
using WinXP Notepad. Notepad only shows a long series of single little
zero like characters. It does not show the data that is known to be
contained in the file.

Win98Se Notepad opens the file properly. Hex editor opens the file and
clearly shows that the characters are all printable ascii 20 32 30 33
20 etc, and another editor, Sc1 opens it properly, only Notepad in the
WinXP does not like this specific file after it has been modified.
Actually, didn't matter how the file got modified, whether done by
WinXP Notepad or another editor, once the header lines are gone,
Notepad on the WinXP doesn't read the file properly again.

Any ideas? Is this some kind of bug?

- Robert -

 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q2FsbG1hcmsx?=
Guest
Posts: n/a
 
      10th Aug 2006
Hi Robert:

Try "copy and Paste" into a new notepad file.

Hope that helps

Mark

"Robert Macy" wrote:

> Is this a bug?
>
> Both files started out as Matlab like data files saved in ascii mode,
> one named f.txt, the other g.txt Both files in their original state
> read properly. Both files consist of all printable characters with
> header lines [each header line begins with the character #] followed by
> simple integer values, separated by spaces. I needed to remove the
> header lines, so I opened each using Notepad, and deleted the five
> header lines, leaving only the integer values.
>
> The first file reads after the header lines are removed with NO
> problem. The second, and similar file, does not read correctly again
> using WinXP Notepad. Notepad only shows a long series of single little
> zero like characters. It does not show the data that is known to be
> contained in the file.
>
> Win98Se Notepad opens the file properly. Hex editor opens the file and
> clearly shows that the characters are all printable ascii 20 32 30 33
> 20 etc, and another editor, Sc1 opens it properly, only Notepad in the
> WinXP does not like this specific file after it has been modified.
> Actually, didn't matter how the file got modified, whether done by
> WinXP Notepad or another editor, once the header lines are gone,
> Notepad on the WinXP doesn't read the file properly again.
>
> Any ideas? Is this some kind of bug?
>
> - Robert -
>
>

 
Reply With Quote
 
 
 
 
Robert Macy
Guest
Posts: n/a
 
      10th Aug 2006
Callmark1 wrote:
> Try "copy and Paste" into a new notepad file.


Pasting to a new .txt file and attempting to save that did not work.
Keep in mind that the original file is strictly spaces and integers and
that's all. Here is what this file looks like...
202 203 205 206 208 209 211 212 215 217 218 220 221 223 224
....there are more numbers with the last being cr lf, like a normal
line.

First, WinXP Notepad would not let me save the pasted file, without
answering some stupid question about ANSI versus saving as UNICODE.
[This file only contains spaces and integers, nothing else] and how if
I didn't do it right it would change my file [which it did do]

If I save the file as unicode, it still comes up all little zeros, but
when viewed on the Win98 Notepad, the data seems to be intact, but two
characters were added at the front of the file [actually making it
slightly bigger] The added characters were ff & fe whose purpose is
unknown. After those two characters the rest of the file appeared to
be intact.

But even this saved file still opens as all zeros in the WinXP Notepad

However, if I force the save to be ANSI, it seems to destroy the file.
It then opens with a long series of ?????? and is indeed destroyed.
Even Win98 notepad no longer has characters in it. just ?????

Forgot to mention that WinXP WordPad opens the file properly, but it's
difficult to get it to do that since .txt files are linked to be opened
with Notepad. However, Wordpad opens the pasted and saved file as all
little zero squares. So Notepad has ruined the file.

Again, this all came about because Notepad was used to open, edit, and
save two similar files. One, which is almost identical has no problems.
BUT...*If* this file has its header lines all is ok. After opening,
Notepad will nicely highlight those header lines and I delete them.
Notepad still is showing the data intact. Then after saving, closing
Notepad application, and reopening by clicking on the file. Notepad
loses its mind. Can't properly reopen something Notepad was just
looking at earlier.

Is this a bug?

- Robert -

 
Reply With Quote
 
Doug
Guest
Posts: n/a
 
      10th Aug 2006
So save the file using "Wordpad" and not "Notepad" if "it"
screws up the file. Where is the problem?

Doug W.

"Robert Macy" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Callmark1 wrote:
>> Try "copy and Paste" into a new notepad file.

>
> Pasting to a new .txt file and attempting to save that did not
> work.
> Keep in mind that the original file is strictly spaces and
> integers and
> that's all. Here is what this file looks like...
> 202 203 205 206 208 209 211 212 215 217 218 220 221 223 224
> ...there are more numbers with the last being cr lf, like a
> normal
> line.
>
> First, WinXP Notepad would not let me save the pasted file,
> without
> answering some stupid question about ANSI versus saving as
> UNICODE.
> [This file only contains spaces and integers, nothing else]
> and how if
> I didn't do it right it would change my file [which it did do]
>
> If I save the file as unicode, it still comes up all little
> zeros, but
> when viewed on the Win98 Notepad, the data seems to be intact,
> but two
> characters were added at the front of the file [actually
> making it
> slightly bigger] The added characters were ff & fe whose
> purpose is
> unknown. After those two characters the rest of the file
> appeared to
> be intact.
>
> But even this saved file still opens as all zeros in the WinXP
> Notepad
>
> However, if I force the save to be ANSI, it seems to destroy
> the file.
> It then opens with a long series of ?????? and is indeed
> destroyed.
> Even Win98 notepad no longer has characters in it. just ?????
>
> Forgot to mention that WinXP WordPad opens the file properly,
> but it's
> difficult to get it to do that since .txt files are linked to
> be opened
> with Notepad. However, Wordpad opens the pasted and saved
> file as all
> little zero squares. So Notepad has ruined the file.
>
> Again, this all came about because Notepad was used to open,
> edit, and
> save two similar files. One, which is almost identical has no
> problems.
> BUT...*If* this file has its header lines all is ok. After
> opening,
> Notepad will nicely highlight those header lines and I delete
> them.
> Notepad still is showing the data intact. Then after saving,
> closing
> Notepad application, and reopening by clicking on the file.
> Notepad
> loses its mind. Can't properly reopen something Notepad was
> just
> looking at earlier.
>
> Is this a bug?
>
> - Robert -
>


 
Reply With Quote
 
Robert Macy
Guest
Posts: n/a
 
      10th Aug 2006
Doug wrote:
> So save the file using "Wordpad" and not "Notepad" if "it"
> screws up the file. Where is the problem?


One more time. Notepad is automatically linked to .txt files.

Doubling clicking to open the file opens it with Notepad. This is ok.
For the first time, as the header lines are removed. The viewing is
correct. Save, reopen with a double click and the file is NOT
presented correctly, although investigation shows that the file is
correct and Notepad has failed. So, the first saving with Notepad is
correct. It just can't be verified later using Notepad.

Right click on the name of the file to select "open with" does NOT
work, instead it opens only with Notepad. Ok, Open with Wordpad. That
means go find Wordpad somewhere, and clicking and clicking and clicking
until I can get the file open. Quite frankly I don't enjoy spending
productive time needlessly playing with a tool that should simply work.
And I don't want Wordpad to open ALL the .txt files, either.

That's the problem.

So, is this a bug?

- Robert -

 
Reply With Quote
 
HeyBub
Guest
Posts: n/a
 
      10th Aug 2006
Robert Macy wrote:
> Doug wrote:
>> So save the file using "Wordpad" and not "Notepad" if "it"
>> screws up the file. Where is the problem?

>
> One more time. Notepad is automatically linked to .txt files.
>
> Doubling clicking to open the file opens it with Notepad. This is ok.
> For the first time, as the header lines are removed. The viewing is
> correct. Save, reopen with a double click and the file is NOT
> presented correctly, although investigation shows that the file is
> correct and Notepad has failed. So, the first saving with Notepad is
> correct. It just can't be verified later using Notepad.
>
> Right click on the name of the file to select "open with" does NOT
> work, instead it opens only with Notepad. Ok, Open with Wordpad.
> That means go find Wordpad somewhere, and clicking and clicking and
> clicking until I can get the file open. Quite frankly I don't enjoy
> spending productive time needlessly playing with a tool that should
> simply work. And I don't want Wordpad to open ALL the .txt files,
> either.
>
> That's the problem.
>
> So, is this a bug?


Unlikely, since Notepad is used, literally, billions of times a day.
Further, you say Notepad works on one file but not on another.

Seems like the problem is data dependent: for example, Notepad has data
limitations not found in Wordpad.

And you don't have to "find Wordpad." XP knows were it is.


 
Reply With Quote
 
Robert Macy
Guest
Posts: n/a
 
      10th Aug 2006

HeyBub wrote:
> And you don't have to "find Wordpad." XP knows were it is.


You are right that there must be something in the pattern of TEXT data
that upsets Notepad as it tries to open this particular file.

For some reason, this file now comes up with three choices for opening
it with a "right click" which simplifies things a bit.
Notepad
Wordpad
Sc1

fairly simple now. only two clicks to get it opened correctly.

But still,...it makes me nervous when applications don't work the way
they're expected to work.

- Robert -

 
Reply With Quote
 
Seahawk60B
Guest
Posts: n/a
 
      10th Aug 2006
There's obviously something different in the second file that is making
notepad treat it differently. When you try to paste it in a new text
file, are you creating the blank file first, or just launching notepad
with a new, yet-to-be saved file. Does it behave differently if you
create a new blank .txt file first, then open that (which should be
ANSI by default), then paste the data into that? What if you copy the
notepad.exe from the Windows 98 box to the XP box as notepad98.exe or
such - Will the notepad98.exe open and save it correctly?

 
Reply With Quote
 
Robert Macy
Guest
Posts: n/a
 
      11th Aug 2006
Seahawk60B wrote:
> There's obviously something different in the second file that is making
> notepad treat it differently. When you try to paste it in a new text
> file, are you creating the blank file first, or just launching notepad
> with a new, yet-to-be saved file. Does it behave differently if you
> create a new blank .txt file first, then open that (which should be
> ANSI by default), then paste the data into that? What if you copy the
> notepad.exe from the Windows 98 box to the XP box as notepad98.exe or
> such - Will the notepad98.exe open and save it correctly?


Perhaps it's just my machine. I can zip the files and send them to
you. Even in ascii they're only around 2KB to 3KB each. I don't need
to zip them. See how your system reads them, perhaps it's just some
initial setup in WinXP that wasn't done correctly.

send request to
macy
...AT..
california
...DOT..
com

I keep files called $blank.txt lying around so I can cut and paste
tidbits as I run across them. Simply "save as" and it's done. Things
like URLs for special information, historical ongoing emails from
people - so it's all in one place. The beauty of .txt is that when the
change from IE4 went to IE5 went to IE6 didn't matter. All was right
there easy archives, easy retrievals. And much smaller memory.

The paste was into an already existing $blank.txt. [Remember Notepad
originally created this file by editing/deleting the header lines. And
saved the file with no special questions, just standard save]] After
reopening and pasting the file into the existing blank.txt file, that's
when Notepad permanently started mucking the file up. And worse asking
questions, expecting answers, without giving any explanations for what
was going on.

Don't know about copying Notepad98.exe I'm not impressed with WinXP
compared to the performance I get from Win98. I bought XP
Professional, but it's likely to be remanded to the trash heap soon.
XP seems be slower, bloated code. have less control, etc. Sadly, it
seems so much historical code is being used that the CPU probably runs
around duplicating efforts. Not until an OS is built from the ground
up again will that get cleaned up very well.

However, WinXP is forgiving when I run C++ programs during development
that're not quite right and bomb things badly. Only once did WinXP
bomb so badly it unrecoverably changed something - don't know what, so
I had to reinstall. But considering the "damage" the offending program
probably did, that was surprising that's all that happened.

I'm still not sure what advantages I'm supposed to see in XP. Just
not obvious to me. Except I definitely have better presentations due
to ads and pop ups and such. In other words, XP makes me a better
recipient of advertising. But that's not my goal in life. Actually, I
keep tripping over WinXP "improvements". Like this Notepad problem.
and Unicode, etc. [I still haven't sorted out how to organize the open
applications icons to prevent XP from "lumping" them inappropriately]
Many really irksome traits are still there. Like naming folders "My
Documents, My Music, My this, My that and then forcing me to use those
folders first.

Let me know if you'd like to look at the pure text file that causes my
Notepad to go strange. The misread file is around 2KB. The other,
similar, coreectly reading file is around 3KB, slightly larger but
contains the same number of integers, 400, in a single line with single
spaces between.

- Robert -

 
Reply With Quote
 
Seahawk60B
Guest
Posts: n/a
 
      11th Aug 2006
I'd be happy to look at the files for you - you can send them to
sh2fpilot at
charter dot net
Sometimes that second pair of eyes helps reveal something...

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger Microsoft ASP .NET 2 2nd Dec 2006 04:46 PM
what is notepad, and how do I open a vcard to view it in notepad? =?Utf-8?B?TW9yVFRpbWU=?= Microsoft Outlook Contacts 2 12th Aug 2005 06:34 PM
Notepad won't open any files (PROBLEM WITH XP & NOTEPAD) leni Windows XP General 1 11th Jul 2004 01:52 PM
Trying to open text (*.txt) files does not launch NOTEPAD =?Utf-8?B?c3J1c2theQ==?= Windows XP Help 1 19th Jun 2004 03:25 PM
notepad.exe launches Windows Debugger instead of notepad application Mohammad Hashim Windows XP General 2 11th Oct 2003 08:00 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:51 AM.