ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

weird notepad bug - creating a text file with "Bush hid the facts"...

(1/1)

db90h:
Hehehe...

http://www.shoutwire.com/comments/16341/Bush_Hid_The_Facts

<excerpt>

This isn't really an editorial, but it's cool nonetheless. I'm sure it'll start some interesting discussion.

For those of you using Windows, do the following:

1.) Open an empty notepad file
2.) Type "Bush hid the facts" (without the quotes)
3.) Save it as whatever you want.
4.) Close it, and re-open it.

Is it a cover up? Is it a government conspiracy? Or is it just a really weird bug?

</end>

Yes, this actually works.

.... Stop reading here... Try it out... Be sure not to add a new line (though maybe it works with a new line too).

You conspiracy theorists might be going crazy now, but it seems to be nothing more than a weird bug. It's probably something to do with notepad trying to auto-detect UTF8 or UTF16 (unicode) files, if I had to guess.

Any string in a specific format causes this behavior.

.........

A lesson to not read the shoutwire comments:

Those idiots on shoutwire have some screwy opinions. Some believe its a conspiracy.

One guy called it an easter egg, and was so sure of himself. "Guys, this is what you call an easter egg". No, this is what you call a bug in the auto-detection of the encoding.

One guy who guessed right (the only guy?) wanted encoding information stored in a text file. Nice idea, but it'd break compatibility with a file format (if you want to call it that, since it really has no header) that's been around longer than he has.

The MAC people take this opportunity to say, "Yea, that's why you should use a MAC. You don't have to worry about viruses, trojans, or a generally bad OS".

Then it turns into a discussion on fat americans and obesity.


app103:
This same bug is not specific to Windows Notepad...it is also in Notepad 2.

Oddly though it's not in either of the simple notepad projects I wrote with Delphi and C++ Builder.

db90h:
If youThis same bug is not specific to Windows Notepad...it is also in Notepad 2.
Oddly though it's not in either of the simple notepad projects I wrote with Delphi and C++ Builder.
-app103 (June 16, 2006, 01:16 AM)
--- End quote ---

It's probably some standard auto-detection algorithm of Unicode text. If you didn't implement this, or otherwise don't support Unicode, then your notepad clones wouldn't be susceptible.

It actually is quite reasonable that this exists, since with no encoding information in text files, for ease of use there has to be some sort of heuristic to try to figure out the file format.

Josh:
This is a bug in the unicode detection algorithms for various applications. This is not notepad specific

Navigation

[0] Message Index

Go to full version