Friday, February 15, 2013

Notepad Bug (XP Only)

This bug no longer works in Windows Vista or Windows 7, but if you’re still running Windows XP, give it a try.
Launch Notepad and type the following sentence: Bush hid the facts
Now save the file as anything you like, close it and open it again. What do you see?
windows bugs
If you did this in Windows XP, you probably see some weird unicode characters or Chinese characters like in the screenshot above. By the way, I have to admit that I ‘forged’ the screenshot because I no longer run Windows XP.
The explanation for this bug lies in the Windows function ‘IsTextUnicode’. When a text file is encoded in Windows-1252 it is interpreted as UTF-16LE, resulting in the so-called mojibake. It means that Notepad recognizes unicode characters representing Chinese characters and translates them back into Chinese characters.

No comments:

Post a Comment