catch when string encoding fails from sql