Bugfree.dk – Ronnie Holm's blog

Not anti-anything, just pro-quality

How to break Notepad

Posted by Ronnie Holm on September 2nd, 2006

Do the following:

  • Open Notepad
  • Type in “this app can break” (without the quotes)
  • Save file
  • Close Notepad
  • Re-open saved file in Notepad

Now Notepad displays funny looking foreign characters.

This is caused by a “bug” in the Win32 function IsTextUnicode, which Notepad calls to heuristically determine if a file is Unicode encoded.

For more in-depth info click here.

Share