Dim arrBytes() As Byte
Dim Var As String
Dim Result As String
Var = Subject
arrBytes = Var.GetBytes("ISO-8859-1")
Result = BytesToString(arrBytes,0,arrBytes.Length, "ISO-8859-1")
'Result is still.. "=?ISO-8859-1?B?RW1uZSDm+OXG2MU=?="
Below my Sub to build subject string including url with description of format for e-mail subject. Based on my Sub you can create Sub to perform conversion back to plain String. Use l_sCharset As String = "ISO-8859-1" instead of "UTF8", DecodeBase64 instead of EncodeBase64 and etc.
B4X:
' http://www.sendblaster.com/en/utf8-email-subject-encoder
Private Sub Subject_EncodeBase64() As String
Dim Const l_sCharset As String = "UTF8"
' The encoding must be either B or Q, these mean base 64 and quoted-printable respectively.
' You can read the RFC 1342 document for more information about how they work.
Dim Const l_sEncoding As String = "B"
Dim l_su As StringUtils
Return $"=?${l_sCharset}?${l_sEncoding}?${l_su.EncodeBase64(Subject.GetBytes(l_sCharset))}?="$
End Sub
Below my Sub to build subject string including url with description of format for e-mail subject. Based on my Sub you can create Sub to perform conversion back to plain String. Use l_sCharset As String = "ISO-8859-1" instead of "UTF8", DecodeBase64 instead of EncodeBase64 and etc.