james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <mime4j-...@james.apache.org>
Subject [jira] [Commented] (MIME4J-218) Content-Type Fallback Character Set
Date Wed, 29 Oct 2014 17:19:34 GMT

    [ https://issues.apache.org/jira/browse/MIME4J-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14188605#comment-14188605
] 

ASF GitHub Bot commented on MIME4J-218:
---------------------------------------

GitHub user WolfgangFahl opened a pull request:

    https://github.com/apache/james-mime4j/pull/1

    fix for MIME4J-218

    fixes https://issues.apache.org/jira/browse/MIME4J-218


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/WolfgangFahl/james-mime4j trunk

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/james-mime4j/pull/1.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1
    
----
commit 5a9db5480ab20d970ed6c9826f04262e15bfff4d
Author: Wolfgang Fahl <wf@bitplan.com>
Date:   2014-09-29T18:45:16Z

    adds proposed patch for https://issues.apache.org/jira/browse/MIME4J-218

commit aaf3ae00180e7e23d43b179e2c3a11220624dad6
Author: Wolfgang Fahl <wf@bitplan.com>
Date:   2014-10-02T12:31:29Z

    improves lenient behaviour

commit e2835e1c7d63ce17aa24a2930324d65d2bed033d
Author: Wolfgang Fahl <wf@bitplan.com>
Date:   2014-10-02T17:26:47Z

    adds lenient test

commit 907f1352572d198de6a611c236f71578480135c5
Author: Wolfgang Fahl <wf@bitplan.com>
Date:   2014-10-02T17:39:25Z

    fix superfluous blanks

----


> Content-Type Fallback Character Set
> -----------------------------------
>
>                 Key: MIME4J-218
>                 URL: https://issues.apache.org/jira/browse/MIME4J-218
>             Project: James Mime4j
>          Issue Type: Bug
>    Affects Versions: 0.7.2
>            Reporter: Rickard Ekeroth
>             Fix For: 0.8.0
>
>
> Would it be possible to add a feature that would allow for specifying a fallback character
set to use when the character set in a 'Content-Type' header is not recognized by Java? In
the old 0.6.2 version, that we used before, the character set 'ISO-8859-1' was used as a fallback
but in the 0.7.2 version an UnsupportedEncodingException is thrown when the parser encounters
an unknown character set in a Content-Type header.
> Here is the relevant part of the exception stack trace:
> Caused by: java.io.UnsupportedEncodingException: x-user-defined
> at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52)
> at java.io.InputStreamReader.<init>(InputStreamReader.java:83)
> at org.apache.james.mime4j.message.BasicTextBody.getReader(BasicTextBody.java:49)
> We receive, parse and archive a vast number of confidential e-mail messages (for which
we use Mime4J) and every now and then we get an e-mail message that contains a non-standard
character encoding name (in this case 'x-user-defined'). With the old (0.6) Mime4J version
we were still able to parse and read most of those e-mail messages because of the fallback
character set in the parser.
> I can unfortunately not post the entire message here but the content-type header that
caused the above exception looks like this:
> Content-Type: text/plain; charset="x-user-defined" 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message