[Vtigercrm-developers] Mail Converter - subject encoding

Somsak Artwawoot somsak6som at gmail.com
Thu Apr 12 05:17:54 GMT 2018


I believe it is the same situation as Tony reported, but issue is that
content is mixed, so body have ISO and WIN874 characters but files are
mixed Japanese and English characters.
Email is sent from Outlook.com so is messed up similarly to what happen
with  Tony issue.
Obviously it is problem of Microsoft as this situation last for years and
those guys don't dare to take care of it. UTF8 should be default and for
everything.
I willing to play with various encoding just not sure how to get "iconv"
with *$filename[$i]* under *__parseBody*  function.
Can you share snippet?

Regards
Somsak

On Wed, Apr 11, 2018 at 6:06 PM, Stefan Warnat <ich at stefanwarnat.de> wrote:

> Hy Somsak,
>
> I think this can be converted also within MailRecord.php within function
> *__parseBody*. There are the lines to read filenames from mail. (Search
> for *$filename[$i]*) I cannot send you the final snippet, because I don't
> now your japan encoding.
>
> Also to you: I want to check this encoding with my Mailscanner, because he
> need exactly this special mails as test case. Can you please send a
> testmail with japanese file attachments to my sandbox mailbox
> *support at redoo.email?*
> At best with Japanese chars in Subject and Content too.
>
> Regards,
>
> Stefan
>
>
>
> ----
> *Freelancer at Webdevelopment*
>
> Web: http://www.stefanwarnat.de
> Xing: https://www.xing.com/profile/Stefan_Warnat2
> LinkedIn: http://www.linkedin.com/pub/stefan-warnat/6/827/820
> eMail: kontakt at stefanwarnat.de
>
>
> On Wed, Apr 11, 2018 at 5:12 AM, Somsak Artwawoot <somsak6som at gmail.com>
> wrote:
>
>> Screenshot attached. This is example of Japanese filenames.
>>
>>
>> Somsak
>>
>> On Mon, Apr 9, 2018 at 6:12 AM, Somsak Artwawoot <somsak6som at gmail.com>
>> wrote:
>>
>>> Good hint! But if filename have same set of characters it not decoded
>>> properly. Where filenames are going to be decoded?
>>>
>>> SOmsak Art
>>>
>>> On Mon, Apr 9, 2018 at 4:42 AM, Tony Sandman <tonysandman999 at gmail.com>
>>> wrote:
>>>
>>>> That worked out. Tnx.
>>>>
>>>> It usually happen when sending in TH from outlook.com or maybe also
>>>> from some other stuff.
>>>>
>>>> T.
>>>>
>>>> On Mon, Apr 9, 2018 at 4:21 AM, Stefan Warnat <ich at stefanwarnat.de>
>>>> wrote:
>>>>
>>>>> Hy Tony,
>>>>>
>>>>> Probably by adding this line after the last line of *__construct*
>>>>> function of MailRecord.php:
>>>>>
>>>>> $this->_subject  = iconv('WINDOWS-874', 'UTF-8', $this->_subject);
>>>>>
>>>>> But I have one additional question for you, because I'm not full sure how to send such email, like in real situations.
>>>>> (I know how to send with PHP; but I'm not sure this will be create a real test case.)
>>>>>
>>>>> Can you please send a so encoded mail to *support at redoo.email* ? I will add this mail to my test cases of Mailscanner of our modules to automatically decode. Many thanks!
>>>>>
>>>>>
>>>>> Regards,
>>>>>
>>>>> Stefan
>>>>>
>>>>> ----
>>>>>
>>>>> *Redoo Networks GmbH*
>>>>>
>>>>> On Sun, Apr 8, 2018 at 5:55 AM, Tony Sandman <tonysandman999 at gmail.com
>>>>> > wrote:
>>>>>
>>>>>> I can convert body text written in WIN874 adding following to
>>>>>> "function getBodyText"
>>>>>>
>>>>>> if ($this->_charset == 'windows-874') {
>>>>>>             $bodytext  = iconv('WINDOWS-874', 'UTF-8', $bodytext);
>>>>>>              }
>>>>>>
>>>>>> But how to decode subject? Tickets titles are illegible when
>>>>>> converted from WIN874
>>>>>>
>>>>>> Help appreciated
>>>>>>
>>>>>> Tony
>>>>>>
>>>>>> _______________________________________________
>>>>>> http://www.vtiger.com/
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> http://www.vtiger.com/
>>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> http://www.vtiger.com/
>>>>
>>>
>>>
>>
>> _______________________________________________
>> http://www.vtiger.com/
>>
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20180412/a37b74ef/attachment.html>


More information about the vtigercrm-developers mailing list