Jump to content

Wrong charset using IMAP (customer service)


Recommended Posts

Hello!

 

I have some unusual issue with IMAP option in my customer service. Messages retrived from my mailbox do not have their original charset. I'm looking into AdminCustomerThreadsController.php file, but I don't see anything wrong there. Any suggestions?

 

Moreover I would like to ask if there is any option (like CRON or something) for auto-sync customer service with mailbox every 5 minutes or so?

 

I would forgot - I'm using the newest version of Presta.

 

Cheers,

prosiaczq

Edited by prosiaczq (see edit history)
Link to comment
Share on other sites

There is a bug in 982 line of file AdminCustomerThreadsController.php

$message = utf8_encode($message);

As far as I know, function utf8_encode() is only working on strings ISO-8859-1, which is wrong in this situation. The solution I used is replacing this code with proper:

$message = iconv(mb_detect_encoding($message),'UTF-8',$message);

And so, I still want to know how to make it auto-sync with mailbox in periods of time.

Edited by prosiaczq (see edit history)
  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...