Perhaps that is your key, then. Use TextEncoding.IsValidData to test for the encodings you expect (UTF8, etc).
Is this an existing XOJO feature? is so, I cannot find it any any docs
ok… not extensively tested yet…
FUNCTION isBase64(byRef s As String) As Boolean
Dim d As String
Dim e As String
d=DecodeBase64(s)
If Encodings.UTF8.IsValidData(d) Then
e=EncodeBase64(d)
If (e=s) Then
s=d
Return True
End If
End If
Return False
END FUNCTION
Also if it IS a Base 64 string, it returns the decode version