DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: weird notepad bug - creating a text file with "Bush hid the facts"...  (Read 7,248 times)

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 481
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
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.


« Last Edit: June 16, 2006, 06:47 AM by brotherS »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,888
    • Participated in NANY Challenge Six Times
    • Coding Snacks
    • Gathering Badge
    • Cody Award
    • Volunteers/Staff
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

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 481
    • Coding Snacks
    • Military Service Badge - US Army
    • Linux User
If you
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.

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.
« Last Edit: June 16, 2006, 06:22 AM by db90h »

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 3,411
    • Gathering Badge
    • Official Forum Clown
    • Coding Snacks
    • Plugin Coding Medal
    • Volunteers/Staff
    • Military Service Badge - US Army
    • Furry Fandom Badge - Furry Fandom
    • Linux User
This is a bug in the unicode detection algorithms for various applications. This is not notepad specific
Strength in Knowledge

Original address: https://www.donationcoder.com/forum/index.php?topic=4039.0