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.