Jump to content
CCleaner Community Forums
Sign in to follow this  
Humpty

How to trick notepad

Recommended Posts

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

:

 

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

Hi DJ

 

 

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

Share this post


Link to post
Share on other sites

post-4193-1151031872.jpgpost-4193-1151031912.jpg

 

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

post-4193-1151031872.jpg

post-4193-1151031912.jpg

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...