Funny NotePad Tricks
Post date: Mar 17, 2011 1:26:14 PM
Open Notepad
Enter four words separated by spaces, wherein the first word has 4 letters, the next two have three letters, and the last word has five letters
DON'T hit enter at the end of the line.
Save the file.
Close Notepad.
Reopen Notepad.
Open the file you just saved.
Exampe:
type “Haro ooo ooo oooon” without quotation marks
don’t press “enter” save the file
close notepad
open the file again
See what happens!
Why is it so?
The reason this happens:
In notepad, any other 4-3-3-5 letter word combo will have the same results.
It is all to do with a limitation in Windows. Text files containing Unicode UTF-16-encoded Unicode are supposed to start with a "Byte-Order Mark" (BOM), which is a two-byte flag that tells a reader how the following UTF-16 data is encoded.
1) You are saving to 8-bit Extended ASCII (Look at the Save As / Encoding format)
2) You are reading from 16-bit UNICODE (You guessed it, look at the Save As / Encoding format)
This is why the 18 8-bit characters are being displayed as 9 (obviously not supported by your codepage) 16-bit UNICODE characters