You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mime4j-dev@james.apache.org by "Nevin (JIRA)" <mi...@james.apache.org> on 2009/12/20 14:04:18 UTC
[jira] Created: (MIME4J-144) DecoderUtil.decodeEncodedWords can not
decode the encoded-test starts with "="
DecoderUtil.decodeEncodedWords can not decode the encoded-test starts with "="
------------------------------------------------------------------------------
Key: MIME4J-144
URL: https://issues.apache.org/jira/browse/MIME4J-144
Project: JAMES Mime4j
Issue Type: Bug
Components: project
Affects Versions: 0.6
Reporter: Nevin
In Rfc 2047, the encoded word is described as below:
encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
If the encoding is Q and the encoded-test starts with "=", DecoderUtil.decodeEncodedWords can not parse the word correctly.
For example:
String fieldValue = EncoderUtil.encodeEncodedWord("中国", Usage.TEXT_TOKEN, 0, Charset.forName("gb2312"),Encoding.Q);
System.out.println(fieldValue);
System.out.println(DecoderUtil.decodeEncodedWords(fieldValue));
The output is :
=?GB2312?Q?=D6=D0=B9=FA?=
=?GB2312?Q?=D6=D0=B9=FA?=
In fact the second line of the output should be the original word 中国.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (MIME4J-144) DecoderUtil.decodeEncodedWords can not
decode the encoded-test starts with "="
Posted by "Nevin (JIRA)" <mi...@james.apache.org>.
[ https://issues.apache.org/jira/browse/MIME4J-144?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nevin closed MIME4J-144.
------------------------
Resolution: Duplicate
It's already reported and resolved in below:
MIME4J-138 DecoderUtil.decodeEncodedWords() fails if encoded-text starts with an equals sign
> DecoderUtil.decodeEncodedWords can not decode the encoded-test starts with "="
> ------------------------------------------------------------------------------
>
> Key: MIME4J-144
> URL: https://issues.apache.org/jira/browse/MIME4J-144
> Project: JAMES Mime4j
> Issue Type: Bug
> Components: project
> Affects Versions: 0.6
> Reporter: Nevin
> Original Estimate: 0.07h
> Remaining Estimate: 0.07h
>
> In Rfc 2047, the encoded word is described as below:
> encoded-word = "=?" charset "?" encoding "?" encoded-text "?="
> If the encoding is Q and the encoded-test starts with "=", DecoderUtil.decodeEncodedWords can not parse the word correctly.
> For example:
> String fieldValue = EncoderUtil.encodeEncodedWord("中国", Usage.TEXT_TOKEN, 0, Charset.forName("gb2312"),Encoding.Q);
> System.out.println(fieldValue);
> System.out.println(DecoderUtil.decodeEncodedWords(fieldValue));
> The output is :
> =?GB2312?Q?=D6=D0=B9=FA?=
> =?GB2312?Q?=D6=D0=B9=FA?=
> In fact the second line of the output should be the original word 中国.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.