Interesting. When the first two characters of a text file are ÿþ, that is a notice to the text editor that it is a UTF-16 LE encoded file (is unicode). More details on Wikipedia.https://en.m.wikipedia.org/wiki/Byte_order_mark
The ^@ character represents the byte 00 or null. This is to be expected, as a unicode UTF-16 LE uppercase letter 'I' is '49 00' in hex.
nano is a simple text editor, hence its name. It cannot handle BOM nor UTF-16. Maybe use a different text editor like vim (I am no
What is also interesting, is that your sysfileread is giving you only the first three bytes in your string. If you know a bit about the storage format of CODESYS Strings, you will know that the first byte of the memory location is the first character. The end of the string is either the whole string size, or the first NULL character (hex 00). So of course the letter I (49 00) contains a NULL, and so locates the end of your string.
Try with a WSTRING, which is UTF-16 already. (not sure LE or BE, or worse if it is processor dependant) (you might have to write code to delete the BOM character, if present)