Search code examples
javaemailencodingdecodinggb2312

=?gb2312 encoding issue and recomendation


I am writing java code to decode the incoming email traffic encoded using =?gb2312? and Not always MimeUtility.decodeText() succeeds with the chinese characters.
I see few recomendations to use =?gb18030? instead and it works for the set i tried.

Is it safe to replace gb2312 with gb18030 ?


Solution

  • I was just looking into this for a customer the other day. You can use GBK or CP936 instead to get GB2312 to decode correctly.