Notepad Bug
June 28th, 2006
Google Blogoscoped pointed to a real cool Notepad Unicode Detection bug.
Try this. Create a new text file on your desktop, open it with Notepad, enter the following line (no return character)…
Bush hid the facts
… and save it. Close the file and open it again. You might now see some strange Chinese characters that don’t translate into anything meaningful, or boxes if you don’t have the Chinese font installed…
It also works with "this app can break". It seems to occur because Notepad thinks the file is a UTF-16 string. As it interprets it as multibyte Unicode (2 bytes per character), you get 8 characters.
It’s been reported that it works for any strings with the same length and where the spaces are in the same place. I tried the trick with "nnnn nnn nnn nnnnn" and it worked; so did "woah bob eat grass". Though for some reason, "woah cow eat grass" did not work.
- Cool Stuff , Microsoft , Windows
- Comments(1)

Digg
StumbleUpon
it also works with ‘tony blair hid the facts’