![]() | This article has multiple issues. Please help improve it or discuss these issues on the talk page . (Learn how and when to remove these messages)
|
"Bush hid the facts" is a common name for a bug present in Microsoft Windows which causes text encoded in ASCII to be interpreted as if it were UTF-16LE, resulting in garbled text. When the string "Bush hid the facts", without quotes, was put in a Notepad document and saved, closed, and reopened, the nonsensical sequence of the Chinese characters " 畂 桳 栠 摩 琠 敨 映 捡 獴 " would appear instead. [1]
While "Bush hid the facts" is the sentence most commonly presented to induce the error, the bug can also be triggered by other strings such as "hhhh hhh hhh hhhhh", [2] "this app can break", [3] and even "a " or "z!". [1]
When a text file is opened in Notepad, Windows checks if the text is encoded in UTF-16 using the Win32 charset detection function IsTextUnicode . IsTextUnicode guesses it is Unicode if the total changes to the "low byte" (the even indexes starting at 0) is three times greater than the total changes to the "high byte" (the odd indexes). [1] If so, it returns true, causing the application to incorrectly interpret the text as UTF-16LE. [4] As a result, Notepad renders the text as Chinese characters. It is commonly believed that spaces at even indexes trigger the bug, this is due to space (32) being farther away from the lower-case letters (97...122) than letters are from each other.
The bug had existed since IsTextUnicode was introduced with Windows NT 3.5 in 1994, but was not discovered until early 2004, [5] when George W. Bush was president of the US. Many text editors and tools exhibit this behavior on Windows because they use IsTextUnicode to determine the encoding of text files. In Windows Vista, Notepad was modified to use a different detection algorithm that does not exhibit the bug, but IsTextUnicode remains unchanged so any other tools that use it are still affected. [6] Modern documentation states "These tests are not foolproof." [7]
Several workarounds exist for this bug: