Page 1 of 1

Issue with special characters when fetching pop3

Posted: Tue Oct 30, 2012 3:09 pm
by Halwas
Script URL: http://support.elcon-it.dk
Version of script: 2.4.1
Hosting company: EL:CON Kommunikation A/S
URL of phpinfo.php: http://support.elcon-it.dk/phpinfo.php
URL of session_test.php: http://support.elcon-it.dk/session_test.php
What terms did you try when SEARCHING for a solution:
[CUSTOMER], pop3, browsing around FAQ
Write your message below:
We use HESK in Denmark and have some troubles parsing pop3 mail from senders using special danish characters in their names.

When a user creates a ticket by sending an email to the hesk pop3 mailbox and the senders name contains special character æ, ø, å or Æ, Ø, Å, then the sender will be named: [Customer]

It only regards sendernames, special characters included in message body are parsed fine into the ticket.

Maybe someone can point me in the right direction, so I can fix it?

Best regards

Flemming Hansen

Re: Issue with special characters when fetching pop3

Posted: Tue Oct 30, 2012 8:24 pm
by Klemen
Hello,

Try this:

1. open file inc/pipe_functions.inc.php in a text/html editor
2. find

Code: Select all

$tmpvar['name'] = hesk_input($results['from'][0]['name']) or $tmpvar['name'] = $hesklang['pde'];
3. instead of that code use

Code: Select all

if ( empty($results['from'][0]['name']) )
{
	$tmpvar['name'] = $hesklang['pde'];
}
else
{
	$tmpvar['name'] = $results['from'][0]['name'];
	if (! empty($results['subject_encoding']) && strtoupper($results['subject_encoding']) != 'UTF-8' )
	{
		$tmpvar['name'] = iconv($results['subject_encoding'], 'UTF-8', $tmpvar['name']);
	}
}
4. save, upload and test.

Does this help with the name issue?

Re: Issue with special characters when fetching pop3

Posted: Wed Oct 31, 2012 8:32 am
by Halwas
Hello

It worked perfectly.

Thank You for a fast answer and a great solution to my problem.

And thank you for HESK itself. I simply love it.

Best regards

Flemming Hansen

Re: Issue with special characters when fetching pop3

Posted: Mon Nov 05, 2012 12:03 am
by spagr
Hello,
I had the same problem in Czech language and POP3 fetching.

I resolved this problem in asimple step, in one line :

1. file inc/mail/email_parser.php
2. find function process_addrname_pairs($email_info) declaration
3. find line (in ver. 2.4.1 line no. 143)

Code: Select all

{
    $name = $info["name"];
}
4. change it to this

Code: Select all

{
    $name = array_key_exists("encoding", $info) ? iconv($info["encoding"], "UTF-8", $info["name"]) : $info["name"];
}
5. save & upload & test

Martin

Re: Issue with special characters when fetching pop3

Posted: Mon Nov 05, 2012 5:43 pm
by Klemen
That would work too, yes.

An official solution will be included in the next update.

Re: Issue with special characters when fetching pop3

Posted: Mon Dec 03, 2012 8:55 pm
by ambitionen
For me its not just a problem of name !!


Standard german text (containing "äöüß") is cut-off in the text sending mail by my mail-client (Foxmail).
When using a webmailer it works.

So maybe a problem of encoding, but very difficult to track for me

Re: Issue with special characters when fetching pop3

Posted: Tue Dec 04, 2012 3:46 pm
by Klemen
It's an encoding-related issue, but if the webmail shows it correctly it is possible that your mail client is having encoding problems.

What happens if you try with some other modern mail client, like Mozilla Thunderbird?