Bug in Notepad

Thursday, 30 November 2006 17:11 by admin
Some of you might already have known this, but I just recently discovered this in an archived blog. This bug has existed since Windows 98 as the writer of the blog said though I haven't tried it on older machines. This bug, although an old one is still present in Windows XP. To expose the bug try this: 1. Open Notepad 2. Type 'AAAA BBB CCC DDDDD' (or any other 4-3-3-5 letter combination) 3. Save the document, and close notepad 4. Open the saved file update: Type 'AAAA BBB CCC DDDDD' in notepad without the quotes and do not press enter after typing it. As you will notice the text is being converted to little sqaures "䅁䅁䈠䉂䌠䍃䐠䑄䑄"(unicode characters) . I can't quite explain this but it has something to do internally with its multi-language support. As I was trying this bug, I accidentally pressed F1 (help) on notepad and as I was reading through its help I found new tricks with notepad that I never knew existed. I think its quite useful when your debugging scripts. Here are some tips:
  • When editing a file, press the F5 key to insert the system date and time
  • Change or add headers & footers by selecting file | page setup
  • Press ctrl-G and enter a line number to go to (VERY useful when debugging VBScript errors)
  • Select view | status bar to display the line/character number as you navigate the file (another beneficial debugging aid)
update: Ctrl+G would not work if worwrap is enabled. Thanks to billy for correcting this... But the best trick I've learned is this:
  • open notepad
  • set the first line to be (without the quotes and in uppercase) ".LOG"
  • press enter and save/close the file
  • every time you open the file, notepad will automatically insert the system date/time at the end of the file and add a new line where you can begin typing
This trick is very useful specially when creating a LOG file for an application. Now you don't have to manually insert a date stamps for your LOG,  just let notepad handle it for you.

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
Categories:  
Actions:   E-mail | Permalink | Comments (6) | Comment RSSRSS comment feed

Comments

December 2. 2006 05:12

The CTRL G trick won't work when you have wordwrap enabled. Smile just so you'd know.

BeLe

December 3. 2006 22:12

John Cuison

I was also amazed when I also accidentally press on F5... That was the time when I debugging my windows service and i created text files to trace... the blah blah and blahs....

Now I've tried the AAAA BBB CCC DDD it does work... but when I've tried the ZZZZ XXXX WWW YYYY it does not work... So guess it????

I conclude that when it is in hexadecimal format it converts it into tiny square coz i think it assumes that it is a machine language...

Just a wild guess???? Smile

John Cuison

December 3. 2006 22:12

pauldomag

Hmmm... Kinda forgot to mention that. Thanks bill!

pauldomag

December 3. 2006 23:12

すごい パルーさん!This would be of great help to me. Especially creating log file. I actully logged my daily activities in my work.

areman

December 4. 2006 00:12

John

hhmmm... nice paul. maybe i can use this in creating a log for my current project.

for the CTRL G trick... i think in WIN 2k. Wordwrap is enabled or not, the trick still work. Smile

John

December 5. 2006 02:12

budoi

I tried to open it with Ultraedit, the letters were there as I originally typed them instead of the squares. But when I tried Notepad2, the squares were back. BTW, Notepad2 wasn't made by Microsoft

budoi

Add comment


(Will show your Gravatar icon)  

biuquote
  • Comment
  • Preview
Loading