Where does the data that makes up the value of the variable come from? It's being set to unexpected data, maybe unicode? Is it in a loop where the variable is getting changed each iteration and this time you get the unexpected data? Or is the variable set once at the start and it's getting stomped on? If you can, look at the hex value of the variable data to see the true data. It may provide a clue.