Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 07, 2016, 02:21:03 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

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

db90h

  • Coding Snacks Author
  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
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, 01:47:06 AM by brotherS »

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,666
    • View Profile
    • App's Apps
    • Read more about this member.
    • Donate to Member
Re: weird notepad bug - creaing a text file with "Bush hid the facts"...
« Reply #1 on: June 16, 2006, 01:16:02 AM »
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
  • ***
  • default avatar
  • Posts: 481
  • Software Engineer
    • View Profile
    • Bitsum - Take control of your PC
    • Read more about this member.
    • Donate to Member
Re: weird notepad bug - creaing a text file with "Bush hid the facts"...
« Reply #2 on: June 16, 2006, 01:20:54 AM »
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, 01:22:32 AM by db90h »

Josh

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Points: -5
  • Posts: 3,397
    • View Profile
    • Donate to Member
This is a bug in the unicode detection algorithms for various applications. This is not notepad specific