RSS Feed (xml)

Powered By

Skin Design:

Powered by Blogger

Monday, March 17, 2008

Notepad Phrases

Myth - "There are Secret phrases like "bush hid the facts" you can type into Notepad"

Reality - "Notepad makes a best guess of which encoding to use when confronted with certain short strings of characters that lack special prefixes. The encodings that do not have special prefixes and which are still supported by Notepad are the traditional ANSI encoding (i.e., "plain ASCII") and the Unicode (little-endian) encoding with no BOM. When faced with a file that lacks a special prefix, Notepad is forced to guess which of those two encodings the file actually uses. The function that does this work is IsTextUnicode, which studies a chunk of bytes and does some statistical analysis to come up with a guess. Sometimes it guesses wrong and displays random characters after you save and open the file. Any combination of characters in the same order 4-3-3-5 will cause the same problem: "Bill lie and cheat" "this app can break", "hhhh hhh hhh hhhhh", "this isa bug dummy" ect..."

No comments: