• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

notepad bug - how to recover file?

Red Squirrel

No Lifer
There is this bug/easter egg in notepad that if you type "this app can break" and save the file then open it, it is corrupted. I remember reading up on this and it has something to do with how it tries to encode it differently (why? it's PLAIN TEXT, there's no encoding!). This does not only happen to that one phrase, but it has to do with a combination of characters or something.

Well I was storing important info in a note text doc and the last line I added must of made it so everything matches up to activate that easter egg.

Any way to recover such file? Like is it some kind of bit shifting or something? Whatever it is I can probably write something quick in C++ to fix it, just need to know how, if it's even doable, or if the data is totally scrambled. But I have a feeling it's just the way the bits are ordered or some other thing of that sort.
 
Its not an easter egg, its a buggy unicode detection routine which misinterprets some text as udf-16 encoded (Notepad supports both unicode and txt documents)

If you really think this is the issue, its a display issue, simply open the file with any other editor.
 
Using XP. The file is on a USB key, on my network, and on my work PC, all 3 broke this way. If it matters the copy on my network is on a Linux box. If I open in notepad++ I get the messed up text too. I have a feeling it's too late. Not a HUGE issue but I'm wondering if there is a way.

Actually looking at the file further it does not look like it's recoverable. There's mostly 0x0 chars and 0xff chars and only a few other types, but the variation is not enough to consider the amount of text I had.

Pretty sad though that a simple program like notepad would have a bug like this.
 
Back
Top