Bush hid the facts

Bush hid the facts

Bush hid the facts is the common name for a bug present in the charset detection of all versions of Microsoft Notepad in Windows 2000 and Windows XP, which causes a file of text encoded in Windows-1252 or similar encoding to be interpreted as if it was UTF-16, resulting in mojibake.

While "Bush hid the facts" is the sentence that is most commonly presented on the Internet, it does not exclusively occur with that phrase. The bug can be triggered by many sentences, including those that follow a particular structure: first word with an even number of letters (2 or more) and all other words with odd number of letters (3 or more).

The bug occurs when such a string is entered into Notepad (with no other characters) and then saved as a text file. Upon reloading the file into Notepad, the text will be replaced with nine Chinese characters, or squares if the language pack has not been installed. To retrieve the original text, bring up the "Open a file" dialog box, select the file, select "ANSI" in the "Encoding" list box, and click Open.

Discovery

The bug appeared for the first time in Windows 2000 but was not discovered until early 2004 [http://weblogs.asp.net/cumpsd/archive/2004/02/27/81098.aspx] and has since risen in popularity on the Internet.Fact|date=December 2007

Clearing the content by selecting, cutting and then repasting the text does not prevent reproduction as long as it is carefully done.

Notepad misinterprets the encoding of the file when it is re-opened. If the file is originally saved as "Unicode" rather than "ANSI" the text displays correctly.

Older versions of Notepad such as those that came with Windows 95, 98 or ME do not include Unicode support so the error does not occur.

Notepad2 (by Florian Balmer) also exhibits this behaviour.

It appears that in Windows 2000/XP and Notepad2, these use the Windows API call "IsTextUnicode" [http://msdn.microsoft.com/en-us/library/ms776445(VS.85).aspx] which occasionally returns the incorrect results with the word length combinations mentioned above.

External links

* [http://blogs.msdn.com/oldnewthing/archive/2007/04/17/2158334.aspx The Notepad file encoding problem, redux] – The Old New Thing
* [http://msdn.microsoft.com/en-us/library/ms776445(VS.85).aspx IsTextUnicode] - MSDN Library


Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Media Coverage of the Iraq War — The 2003 invasion of Iraq involved unprecedented media coverageFact|date=April 2008. The coverage itself became a source of controversy, as media outlets were accused of bias, reporters were casualties of both Iraqi and American gunfire, and… …   Wikipedia

  • List of minor characters from The Hitchhiker's Guide to the Galaxy — The following is a list of minor characters in the various versions of The Hitchhiker s Guide to the Galaxy , by Douglas Adams.AgrajagAgrajag is a constantly reincarnated entity who ends up being killed multiple times by Arthur Dent. First… …   Wikipedia

  • List of minor The Hitchhiker's Guide to the Galaxy characters — The following is an alphabetical list of the minor characters in the various versions of The Hitchhiker s Guide to the Galaxy, by Douglas Adams. The descriptions of the characters are accompanied by information on details about appearances and… …   Wikipedia

  • International reactions to the 2006 Lebanon War — Reactions by the UN and national representativesflag|United NationsThe top UN official in Lebanon said Hezbollah’s action escalates the already tense situation along the Blue Line and is an act of very dangerous proportions, in a statement. Kofi… …   Wikipedia

  • Mojibake — The UTF 8 encoded Japanese Wikipedia article for mojibake, as displayed in the Windows 1252 encoding. Mojibake (文字化け …   Wikipedia

  • Notepad — – Editor Notepad unter Windows XP, Lorem Ipsum anzeigend Basisdaten Entwickler: Microsoft …   Deutsch Wikipedia

  • Microsoft Editor — unter Windows 7 Basisdaten Entwickler Microsoft …   Deutsch Wikipedia

  • Notepad — infobox software name = Notepad caption = Notepad in Windows Vista developer = Microsoft latest release version = 6.0.6001.18000 latest release date = February 4 2008 operating system = Microsoft Windows genre = Text editor license = MS EULA… …   Wikipedia

  • Notepad (software) — Notepad A component of Microsoft Windows Notepad on Windows 7 De …   Wikipedia

  • Charset detection — Character encoding detection, charset detection, or code page detection is the process of heuristically guessing the character encoding of a series of bytes that represent text. This algorithm usually involves statistical analysis of byte… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”