Sizzled Core logo

A Hole in Notepad

Now, this is something cool…ÂÂ ÂÂ Over at WinCustomize, someone thought they’d found an Easter Egg in the Windows Notepad application. :p But he infact found something weird in it.

It works like this:

1. Open Notepad
2. Type the text “this app can break” (without quotes)
3. Save the file
4. Re-open the file in Notepad.

Notepad displays seemingly-random Chinese characters, or boxes if your default Notepad font doesn’t support those characters.

It’s not an Easter egg (even though it seems like a funny one), and as it turns out, Notepad writes the file correctly. It’s only when Notepad reads the file back in that it seems to lose its mind.

But we can’t even blame Notepad: it’s a limitation of Windows itself, specifically the Windows function that Notepad uses to figure out if a text file is Unicode or not.

So, how’s this trick? :D If this works, do let me know whether you got boxes or some Chinese character. Well, I got Chinese characters. This works in Windows XP, but I am not sure about Windows Vista.


If you liked this post: Subscribe by Twitter Follow me on Twitter   or   Subscribe by RSS Subscribe via RSS
Author: Haris Nadeem
He is the founder of Sizzled Core and a Pakistani blogger who loves gadgets and exploring out the web!

2 Comments

  1. MyAvatars 0.2

    Its actually because Microsoft has some reserved words

    ‘Con’ is one of them

    Try saving a file with name ‘CON’ and see the magic ;)

  2. MyAvatars 0.2

    Stephen Tordoff

    Wrong

    If anyone is interested in what it is doing… I saved a copy of the file after opening the corrupted version. If you open it in a hex editor, you will see that two bytes have been prefixed to the file: FF FE. The FF FE characters at the start of the file signify that the file is a UTF-16 little-endian encoded file.

    http://en.wikipedia.org/wiki/UTF-16

    Unicode uses 2 bytes instead of 1 bytes like ASCII. The phrase “this app can break” is 18 characters long (include the spaces), which explains why people are seeing 9 Asian or 9 block characters

    http://www.wincustomize.com/ar.....70&c=1

Leave a Reply

Comment moderation is enabled. Your comment may take some time to appear.