/** * Returns decoded Mime header/field. */ public static StringValue decodeMime(Env env, CharSequence word, string charset) { string decodedStr = MimeUtility.decodeText(word.ToString()); StringValue str = env.createString(MimeUtility.unfold(decodedStr)); return(str.toBinaryValue(charset)); }