You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2023-08-10 09:07:57

TB1
Member
Registered: 2022-09-02
Posts: 4

Empty ticket description when character encoding is not UTF-8

Version is 10.9 but this issue is present is all version.
When the e-mail character encoding is not in UTF-8, the e-mail body is not visible in created ticket.
We modified the MailCollector.php file, and  now it works in some cases, but in other cases doesn't and I dont know what the problem is.

  1821
  1822           if (strlen($content) < 2 ) { $content = utf8_encode($part); }
  1823           // $cron_msg1=print_r($content, true);
  1824           $timestemp_message=date("Y/m/d H:i:s");
  1825           $cron_msg1="
  1826
  1827           $timestemp_message " . "
  1828           original: " . utf8_encode($part) . "
  1829           modified: " . $content . "
  1830           ";
  1831
  1832           $myfile = fopen("/srv/www/glpi/files/_log/mailgate_cron.log", "a") or die("Unable to open file!");
  1833           fwrite($myfile, $cron_msg1);
  1834           fclose($myfile);
  1835
  1836          // ** URES MAIL VEGE **
  1837
  1838          return $content;
  1839      }

Is this a bug, that GLPI doesn't handle non UTF-8 mails?

Thanks in advance

Offline

#2 2023-08-10 09:11:56

cedric-anne
Administrator
Registered: 2018-07-02
Posts: 85

Re: Empty ticket description when character encoding is not UTF-8

Hi,

GLPI is supposed to handle other encoding than UTF-8. The test suite already tests some encoding. You should open an issue on Github ( https://github.com/glpi-project/glpi/issues/new/choose ) and attach the email that is not correctly processed into an eml file.

Offline

Board footer

Powered by FluxBB