Is there a way to convert between these two? Casting gives a runtime error. I need both because I have to convert from a memoryblock to text as in:
mytext = Xojo.Core.TextEncoding.ASCII.ConvertDataToText (myblk, true)
and I also need to convert from base64 using DecodeBase64()
, which seems to want classic textencoding.
If I can’t do that, then I hope that a character-set name as supplied via a Content-Type: header can in both cases be converted to the appropriate textencoding via GetInternetTextEncoding()
and FromIANAName()
.