subject is encoding in ISO-8859-1 instead of UTF-8

3 posts / 0 new
Last post
neisep
Offline
Last seen: 3 years 3 months ago
Joined: 27/08/2015 - 20:11
subject is encoding in ISO-8859-1 instead of UTF-8

Hello i have a weird problem on autoresponde message i get subject as encoded as ISO-8859-1 but in DB it is saved as UTF-8

When i have a look at the header it looks like this:

X-Spam-Status: No, score=-0.984 tagged_above=-999 required=6.2
tests=[ALL_TRUSTED=-1, AWL=0.016] autolearn=disabled
Received: from xxxx.xxxx.com ([172.xxx.xxx.xxx])
by xxx.xxxx.com (xxx.xxxx.com [172.xxx.xxx.xxx]) (amavisd-new, port 10024)
with LMTP id K5fc5mULbsaN for ;
Thu, 27 Aug 2015 19:50:32 +0200 (CEST)
Received: from localhost (xxxx.xxxx.com [194.xxx.xx.xxx])
(Authenticated sender: neisep@xxxxx.com)
by xxxxxx.se (Postfix) with ESMTPSA id 5747245C482
for ; Thu, 27 Aug 2015 19:50:30 +0200 (CEST)
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
From: "Ancon Order"
To: neisep@xxxx.com
Subject: =?ISO-8859-1?Q?Nytt_=C3=A4rende=3A_=5B=23198=5D?=
Date: Thu, 27 Aug 2015 19:50:30 +0200
Message-Id: <4BE75A1440697830-neisep@xxxxx.se>
X-Mailer: katak-support v 0.8

If you would use osticket it would instead be ?UTF-8?Q? and that would give correct chars for the subject but i am using katak becuse i like it alot better.

But ÅÄÖ seems not to be properly encoded in subject right now can anyone help me ??

Best regards Jimmie

neisep
Offline
Last seen: 3 years 3 months ago
Joined: 27/08/2015 - 20:11

I solved the problem myself, and i see some other people have had the same issue so here is my fix:

in folder:
\include\pear\Mail\
edit file: mime.php

The following lines:
// The character set to use for html
'html_charset' => 'ISO-8859-1',
// The character set to use for text
'text_charset' => 'ISO-8859-1',
// The character set to use for headers
'head_charset' => 'ISO-8859-1',

too UTF-8 instead of ISO-8859-1 that solved my problem with subject being incorrect when using åäö

Best regards Jimmie

Tomark
Offline
Last seen: 2 months 3 weeks ago
Joined: 14/01/2013 - 16:00

Thanks a lot for sharing the solution!