1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-27 19:52:17 -05:00

Work-around to be able to read messages with "charset=0". QUALCOMM Windows Eudora seems to send headers like this.

Fixes issue 1952
This commit is contained in:
cketti 2010-07-12 19:45:59 +00:00
parent eb7289f97b
commit 665efc1448

View File

@ -15,7 +15,6 @@ import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.OutputStream; import java.io.OutputStream;
import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.regex.Pattern; import java.util.regex.Pattern;
@ -368,7 +367,7 @@ public class MimeUtility
*/ */
final String originalCharset = getHeaderParameter(part.getContentType(), "charset"); final String originalCharset = getHeaderParameter(part.getContentType(), "charset");
String charset = "ASCII"; // No encoding, so use us-ascii, which is the standard. String charset = "ASCII"; // No encoding, so use us-ascii, which is the standard.
if (originalCharset != null) if ((originalCharset != null) && ("0".equals(originalCharset) == false))
{ {
/* /*
* See if there is conversion from the MIME charset to the Java one. * See if there is conversion from the MIME charset to the Java one.