Aug-18-2020, 10:25 AM
I keep coming here to post an interring discovery and then keep realising I've been an idiot.
I said that it was a few tens of characters off, which it was. I first tried using a substring rather than seeking to the index and it didn't change anything. I then thought about using a substring with the file opened in ascii encoding (like at the beginning), not latin-1. Well, this worked and I was in the middle of typing a reply when I realised that I open the file twice and I've only ever been chasing the encoding on one of them. The other has always been ascii which is what was causing the string to be a few characters off. It is now all working which is amazing.
I said that it was a few tens of characters off, which it was. I first tried using a substring rather than seeking to the index and it didn't change anything. I then thought about using a substring with the file opened in ascii encoding (like at the beginning), not latin-1. Well, this worked and I was in the middle of typing a reply when I realised that I open the file twice and I've only ever been chasing the encoding on one of them. The other has always been ascii which is what was causing the string to be a few characters off. It is now all working which is amazing.