The “Bush hid the facts” “bug” in Notepad
Posted by Ryan on February 18th, 2007.
A while back, I came across a site that show what was thought to be a bug in Notepad - that if you type Bush hid the facts, saved and closed it, and then opened it, all you would see were small rectangles. A picture is worth 1000 words, so look at the picture if you aren’t sure what I’m talking about.
Today I came across a site that explains how that happens - turns out that it isn’t a bug in Notepad, but an error in the way Windows tells Notepad if the file is Unicode or not. IsTextUnicode() is a function that is supposed to say if a file is Unicode, but instead of being definitive about it, it only looks at the first 256 bytes of a file, and bases it on that.
As the IsTextUnicode() function dates back to 1994, this isn’t any conspiracy theory…unless the programmer could predict the 2000 election, in which case, can you leave the winning lotto numbers as a comment
This error is very reproducible: just open Notepad, and enter four letters [SPACE] three letters [SPACE] another three letters [SPACE] five letters - nothing else - and save the file. Open it again, and you will see the error.






