Some text editors, including Notepad, add byte order mark (BOM) to indicate UTF-8 text.
It's the EF BB BF at the start of your text file.
See
http://en.wikipedia.org/wiki/Byte_order_mark
My suggestion is add a code to detect and remove the BOM after reading your text files or before using any text string.
You should also ditch Notepad and use a better text editor.
Cheers.