Jump to content


How to trick notepad


17 replies to this topic

#1 OFFLINE   Humpty

    Super Hero

  • Members
  • PipPipPipPipPip
  • 2,125 posts

Posted 18 June 2006 - 01:34 PM

Found this quirk below while surfing.

Notepad displayed squares instead of the text on my machine. :)

This actually works. It will not crash your computer, it just breaks Notepad in that it causes it to display very oddly. No perm damage comes of the following steps.

Here's how to do it:
1. Open up Notepad (not Wordpad, not Word or any other word processor)
2. Type in this sentence exactly (without quotes): "this app can break"
3. Save the file to your hard drive.
4. Close Notepad
5. Open the saved file by double clicking it.

Instead of seeing your sentence, you should see a series of squares. For whatever reason, Notepad can't figure out what to do with that series of characters and breaks.

Link to discussion

#2 OFFLINE   oli

    Advanced Member

  • Members
  • PipPipPip
  • 448 posts

Posted 18 June 2006 - 02:00 PM

weird
Homer: I never apologise, im sorry Lisa. Thats just the way i am

#3 OFFLINE   Humpty

    Super Hero

  • Members
  • PipPipPipPipPip
  • 2,125 posts

Posted 18 June 2006 - 02:56 PM

Apparently the same quirk is in Metapad and Notepad2. :huh:

#4 OFFLINE   Tarun

    Lunarian

  • Banned
  • PipPipPipPipPip
  • 3,071 posts

Posted 18 June 2006 - 02:58 PM

It's because it saves as ascii and not unicode.

#5 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 18 June 2006 - 04:41 PM

No, something about that phrase is tricking it into saving it as Unicode instead of ASCII.

Make two text files, one with the exact phrase, and another with the phrase missing one word... then view both with a hex editor. It's a bug.

#6 OFFLINE   Tarun

    Lunarian

  • Banned
  • PipPipPipPipPip
  • 3,071 posts

Posted 18 June 2006 - 04:58 PM

View PostDjLizard, on Jun 18 2006, 12:41 PM, said:

No, something about that phrase is tricking it into saving it as Unicode instead of ASCII.

Make two text files, one with the exact phrase, and another with the phrase missing one word... then view both with a hex editor. It's a bug.
Ah, so that's what it was. Though it's not the phrase, it's something about the number of characters input. Cause it works with "Bush hid the facts" too.

#7 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 18 June 2006 - 05:19 PM

It works with:
abcd efg hij klmno
too, so it's obviously not the content, but the number, like you said.
They're just putting a stupid phrase about breaking the app to make it seem more credible :P

#8 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 18 June 2006 - 05:39 PM

From http://msdn.microsoft.com/library/default....nicode_81np.asp
:

MiKKKro$0ft said:

The IS_TEXT_UNICODE_STATISTICS and IS_TEXT_UNICODE_REVERSE_STATISTICS tests use statistical analysis. These tests are not foolproof. The statistical tests assume certain amounts of variation between low and high bytes in a string, and some ASCII strings can slip through. For example, if lpBuffer indicates the ASCII string 0x41, 0x0A, 0x0D, 0x1D (A\n\r^Z), the string passes the IS_TEXT_UNICODE_STATISTICS test, although failure would be preferable.

ahahahahahah, so A\n\r^Z will make it fail too

and 4 3 3 5 causes the test to fail as well

It's a limitation of Windows itself (the API for IsTextUnicode()), not Notepad.

#9 OFFLINE   Spysnake

    Advanced Member

  • Members
  • PipPipPip
  • 97 posts
  • Gender:Male
  • Location:Finland
  • Interests:Airsoft, Parkour, Pekiti-Tirsia Kali and computers in general.

Posted 21 June 2006 - 10:48 PM

Just for creeps, type in "Bush hid the facts". Big brother is spying on us?

#10 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 22 June 2006 - 12:05 AM

Yeah, that's what it is. It's definitely not an exploit of the Unicode "guessing" API.

It works with "abcd efg hij klmno" too. Conspiracy? I think so.

#11 OFFLINE   sonsie

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • Location:Nebraska

Posted 22 June 2006 - 12:47 AM

hmmm...if it's about number and sequence of letters, then I'm guessing my quirk isn't related. Now and then when I open my homepage I get either those squares like you describe, or I get tons of symbols. I exit, wait 1 or 2 seconds, try again, and it's usually ok.

sonsie

#12 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 22 June 2006 - 03:34 AM

What browser, what homepage? Not a whole lot of programs use the Unicode guessing API, just ones that have to deal with saving and opening unmarked content (and most websites are properly marked with UTF-8, etc).

#13 OFFLINE   sonsie

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • Location:Nebraska

Posted 22 June 2006 - 07:28 AM

Hi DJ


Quote

What browser, what homepage? Not a whole lot of programs use the Unicode guessing API, just ones that have to deal with saving and opening unmarked content (and most websites are properly marked with UTF-8, etc).

Internet Explorer 6.0 and my home page is MSN.com

I have a picture of both errors I can put here - the squares and the symbols. This is probably really stupid, but I didn't know what if any info could be gotten out of what looks, to me anyway, like a mess, so I was hesitant to post it until I asked you. Is it ok to post them? and would they be helpful? Or do you know what I mean without seeing?

sonsie

#14 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 22 June 2006 - 12:22 PM

Yep, I need to see it.

#15 OFFLINE   sonsie

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • Location:Nebraska

Posted 23 June 2006 - 03:08 AM

Attached File  screwed_up_computer_screen_small.jpg   18.14K   12 downloadsAttached File  screwy_computer_screen_small.jpg   22.88K   13 downloads

Hope this works

sonsie

<sigh> why is everything so difficult

These were originally 370kb so I shrunk them. I thought you could click on them and enlarge, but I can't. Have no idea what to do

sonsie

#16 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 23 June 2006 - 03:22 AM

Once you resize them, they're resized permanently. Start a new thread about this problem and post the full images, unresized. Save your screenshots as PNG in the future, they will be a lot smaller (even mspaint.exe can save PNG). A 1152x864 screenshot using PNG is only 134 KB for me.

#17 OFFLINE   sonsie

    Advanced Member

  • Members
  • PipPipPip
  • 68 posts
  • Location:Nebraska

Posted 23 June 2006 - 09:22 PM

Screw it. Thanks for trying to help, Dj. But my limit for attachments on this site is 236 and I don't know of any way to shrink the screenshots. I've tried a few things, but everything makes them bigger. They're both over 350.

If it happens again - which it will eventually - I'll save the screenshots as png.

sonsie

#18 OFFLINE   DjLizard

    Dial-a-fix author

  • Members
  • PipPipPipPip
  • 1,339 posts

Posted 23 June 2006 - 09:37 PM

That's what I'm saying - take the screenshots again as PNG, and they will fit under the limit.