E-Mail with UTF encoded Subject - if longer then expected length => becomes garbled in gmail |
[eluser]Ki[/eluser]
Hi, I dont want to yell "BUG!!!" just because I have encountered this unexpected behavior BUT I noticed that email subjects with non-english characters (cyrillic) end up showing as "=d0=97=d0=95=d0" when they are longer then a certain length. I was able to fix it by making 2 modifications to Email Class -> function _prep_q_encoding Modifications (2): Code: for ($i = 0, $length = strlen($str); $i < $length; $i++) Here are my headers With 'bad' email subject: Subject: =?utf-8?Q?Objava: =d0=97=d0=95=d0=9c=d0=af =d0=a1=d0=9c=d0=95=d0=9b=d0?= =?utf-8?Q?=9d=d0=98=d0=a6=d0=90?= With 'fixed' email subject: Subject: =?utf-8?Q?Objava: ÐÐÐЯ СÐÐÐÐÐЦÐ?= Can someone comment on this Is this a bug? May I have other issues by commenting out those sections of the class (mentioned above)? Ki
[eluser]takasia[/eluser]
Thanks! This really saved my time :-) I commented out also this line: $str = trim(preg_replace('/^(.*)$/m', ' =?'.$this->charset.'?Q?$1?=', $str)); After that, I got this: Subject: MY_TEXT_IN_JAPANESE instead of this: Subject: =?utf-8?Q?MY_TEXT_IN_JAPANESE?=
[eluser]Narf[/eluser]
How about this: https://gist.github.com/3891474 More info: https://github.com/EllisLab/CodeIgniter/...nt-9330713 |
Welcome Guest, Not a member yet? Register Sign In |