We are getting db errors in Postgre during an insert. The error occurs when inserting the name “OQUINCE EDWARDS”. The apostrophe after the O is not a normal one. The error is:
ERROR: invalid byte sequence for encoding "UTF8": 0x92"
The data comes to us from a variety of sources. My guess is that most data we receive is generated on Windows systems. As a test, we set the encoding using this code:
strFileData= strFileData.DefineEncoding(Encodings.WindowsLatin1)
When we run the app, the error goes away. Prior to today, we have not set the encoding at all and we have not had any problems. If we change the code and explicitly set the string encoding to WindowsLatin1, then what could possibly happen with other data that we process that comes from other sources? We are trying not to fix one problem and cause another.