mirror of
https://github.com/M66B/FairEmail.git
synced 2026-01-03 11:28:41 +01:00
Trim word encoding
This commit is contained in:
@@ -1824,12 +1824,13 @@ public class MessageHelper {
|
||||
}
|
||||
|
||||
static byte[] decodeWord(String word, String encoding, String charset) throws IOException {
|
||||
String e = encoding.trim();
|
||||
ByteArrayInputStream bis = new ByteArrayInputStream(ASCIIUtility.getBytes(word));
|
||||
|
||||
InputStream is;
|
||||
if (encoding.equalsIgnoreCase("B"))
|
||||
if (e.equalsIgnoreCase("B"))
|
||||
is = new BASE64DecoderStream(bis);
|
||||
else if (encoding.equalsIgnoreCase("Q"))
|
||||
else if (e.equalsIgnoreCase("Q"))
|
||||
is = new QDecoderStreamEx(bis);
|
||||
else {
|
||||
Log.e(new UnsupportedEncodingException("Encoding=" + encoding));
|
||||
|
||||
Reference in New Issue
Block a user