You are not logged in.
Pages: 1
Hi all,
I'm using GLPI 0.90.5 on a Windows Server 2012 R2 (IIS) with PHP 5.6 and Google mail.
I now found out that I have several errors when collecting mails. All mails have one thing in common - they contain emoticons.
Is there anything like a switch/flag that I can set to maximize compatibility?
If not - please fix this bug.
Thank you very much!
Offline
Update:
It seems like an incompatible character set conversion in the sql-backend. I first was wondering where to find a detailed mail error log, but meanwhile I stumbled over the following error in the sql-errors.log:
Error: Incorrect string value: '\xF0\x9F\x8F\xBB\x0A\x0A...' for column 'content' at row 1
Backtrace :
inc\commondbtm.class.php:428
inc\commondbtm.class.php:834 CommonDBTM->addToDB()
inc\mailcollector.class.php:555 CommonDBTM->add()
front\mailcollector.form.php:80 MailCollector->collect()
so catching mail seems to work, but inserting into DB (mySQL) fails.
Any idea?
Offline
Can you give me the body of the mail (with the complete text xF0\x9F\x8F\xBB\x0A\x0A..)?
CentOS 6.5 - CentOS 7.x
PHP 5.6 - PHP 7.x - MySQL 5.6 - MariaDB 10.2 + APC + oOPcache
GLPI from 0.72 to dev version
Certifiée ITIL (ITV2F, ITILF, ITILOSA)
Offline
Hi Yllen,
that's the body-part of the email (plain-text):
--001a113db620acd5d2053bc04df1
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
This is a test-mail with a smiley =F0=9F=98=82
Shouldn't work with GLPI or at least fails to be inserted into mysql.
--001a113db620acd5d2053bc04df1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">This is a test-mail with a smiley=C2=A0=F0=9F=98=82<br><di=
v><div class=3D"gmail_signature"><div dir=3D"ltr"><div><div dir=3D"ltr"><di=
v><div dir=3D"ltr"><div><div dir=3D"ltr"><div><div dir=3D"ltr"></div></div>=
</div></div></div></div></div></div></div></div></div>
<div>Shouldn't work with GLPI or at least fails to be inserted into mys=
ql.</div></div>
--001a113db620acd5d2053bc04df1--
Hope you'll find something that helps catching those mails to - because you'll never get the users to stop using smileys ;-)
Many thanks.
Offline
... and here comes the according sql-error.log entry:
Error: Incorrect string value: '\xF0\x9F\x98\x82\x0A\x0A...' for column 'content' at row 1
Backtrace :
inc\commondbtm.class.php:428
inc\commondbtm.class.php:834 CommonDBTM->addToDB()
inc\mailcollector.class.php:565 CommonDBTM->add()
inc\mailcollector.class.php:1601 MailCollector->collect()
: MailCollector::cronMailgate()
inc\crontask.class.php:799 call_user_func()
front\cron.php:66 CronTask::launch()
... couldn't paste the complete INSERT as PunBB (Forum-Software) cuts such characters. --> Probably something similar as with the GLPI SQL-INSERT?
Last edited by auto1 (2016-09-05 13:00:24)
Offline
Most likely you have incorrect encoding for connection / database, you should change it to UTF-8.
Glpi 9.2.2
Offline
Thanks for your hint.
In mySQL the collation is set to utf8_unicode_ci (for DB and all tables).
In php.ini the default_charset is set to UTF-8
In GLPI config-folder I couldn't see anything like utf or char(set) to change.
With this setup I get the error "Error: Incorrect string value: '\xF0\x9F\x8F\xBB\x0A\x0A...' for column 'content' at row 1" while inserting into glpi_tickets.
Any idea where else I could check for the encoding settings?
Many thanks
Offline
Pages: 1