PDA

View Full Version : Why is this so ?



TeeJay
07-10-2006, 11:28 PM
Type this into NOTEPAD and save it. "this app can break" (without quotes)
HAS to be NOTEPAD...
Then open it up and see what you typed.... squares ?

Why is this so ? :banana:
Anyone ?

CaptainMooseInc
07-10-2006, 11:38 PM
It's an eegg of course. Probably put in there for fun.

I used to goto www.eeggs.com all the time when I was younger and play around with the various eeggs.

Marky-UK
07-11-2006, 03:49 AM
It's an error in the code that tries to determine if the text is Unicode or plain ASCII. For some short lower-case ASCII sequences, the code gets confused and thinks the file is Unicode, and it gets displayed as a bunch of Chinese characters - or boxes if you don't have that font installed.

Unicode files are supposed to start with a Byte-Order Mark as the first two bytes of the file. Other text editors don't behave the same way because they either don't support Unicode files, or they require the BOM to be there in Unicode files. Notepad doesn't seem require the BOM and just guesses if its not there - because several 3rd-party applications don't add a BOM when they save Unicode files.