@panagiotis_bellos Also, for future reference (and similar issues), if a string is coming from a text file, you might also need to ensure that the file was not written using a multi-byte encoding.
That might be especially confusing, as your terminal emulator might still render the “expected” character sequence, while the null-terminated C string that you are passing contains extra bytes.