I’m not sure why but sometimes when you convert deserialized MemoryStream object into an UTF-8 string, you get an unexpected character (namely question mark – '?') at the very first position of the string. I haven't completely understood why it is the case, but managed to find a workaround. Basically this '?' symbol is not actually question mark character. It is a combination of three control bytes, and each of them cannot be displayed separately, but their combination gives '?' symbol.
The bytes are: 239, 187, 191
In order to fix the problem just remove these three bytes from a stream before converting it to string: