Yeah, that worked because you pasted the string into PGAdmin and by doing this you changed it’s encoding to UTF8. Your problem is basically that you have no idea what encoding your original file is in.
And that is a good thing. When you say:
Dim t As TextInputStream = TextInputStream.Open(folEntryFile)
t.Encoding = Encodings.UTF8
what you are doing is claiming to know what the encoding of the file is - UTF8 - and asking Xojo to handle it accordingly. Postgres is kind enough to tell you that you are wrong on this account. Xojo too, btw, as can be seen in your point v). Just SQLite does not.
If I were in your shoes I’d try a number of different encodings on this ‘Ciaran’-String just as you did with Encodings.UTF8.IsValidData() until you know what encoding your original file is in. Googling suggests that opening the file in notepad++ is an established way to tackle those encoding issues.
What you did (checking the encoding of this s-string) is no valid test, because you are asking Xojo what encoding the string is in only after you told it the encoding is UTF-8. Got it?