Notepad bug? Encoding issue?
Someone showed me a weird text file today. It was a bat file with 'copy MeYou.bak MeYou.txt'. When you would ran it, it would work. But when you opened it in Notepad, there was nothing.
So we decided to look a bit into this and here is something we came up with to 'create' invisible text:
Open notepad and enter:
' abc.bak abc.txt'
(That is: space abc dot bak space abc dot txt, no line break, without the quotes)
It doesn't work with every string, just follow us on this example and use that one.
Save your file. Notepad picks default ANSI as encoding.
Open your file, Notepad seems to open by default in Unicode encoding.
Your text is now invisible.
Does anyone know why the saving default is different from the opening default?
And why does it happen to that particular piece of text. It doesnt happen to ' b.b b.b' or ' .bak .txt'.
It looks the same when viewing it through a hex editor. But apparently it has to do something with encoding.
Anyone who can explain?
Update: When you paste it in IE or Trillian you get '????????', like some people tried in the comments ;)
Update2: In my notepad screenshot the font was Terminal, when I choose Verdana it are indeed squares. Not that invisible anymore, but still wrong :)
Update3: You can find an explanation on why this is happening at The Old New Thing.