If the error occurs only when reading values ββfrom the file, but not when assigning the string variable directly, then I assume that additional characters are read (quotation marks, escaped characters, carriage return / line channels, etc.).
Try reading the first value in string , and then compare it with what you expect in the explicit value of string . Any differences should be apparent after this.
source share