swiftmailer/swiftmailer — Issue #122: Handling iso-2022-jp encoding for base64
Author: ganchiku
Created: 2011-10-19 11:30:29+00:00
State: open

Header encoding for base64 does not work in JIS code (iso-2022-jp).
base64_encode is working properly, but splitting 76 characters cannot handle after encoding. To do this, we have to check each character to encode to base64.
The easiest way to solve this is using mb_encode_mimeheader, but the usage of mb_encode_mimeheader is not very clean, since we always have to set mb_internal_encoding before calling mb_encode_mimeheader. And after using it, re-set the mb_internal_encoding again.

Also, I would like to mention using iconv functions or mbstring functions. iconv functions cannot handle some Japanese texts, so we have to check the existence of mbstring earlier than iconv functions.

Actually, I'm working with this right now, and will pull request when it finished.