email2ticket not utf-8 characters

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
depperdc
Posts: 7
Joined: Wed Oct 29, 2014 4:51 pm

email2ticket not utf-8 characters

Post by depperdc »

Script URL:
Version of script:
Hosting company: HESK version: 2.5.3
URL of phpinfo.php: 5.3.3 (MySQLi)
MySQL version: 5.1.73
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hello,
when manually adding attachments to tickets, the system automatically changes the characters with diacritics to characters without diacritics, it is ok (submit ticket).
When automatically insert attachments (function email2ticket) Czech characters are not converted, but system shortened attachment at the first Czech character.
Problem is, that In this shortening system will remove the suffix (in ticket). The original file stored in the system Hesk is fine.
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: email2ticket not utf-8 characters

Post by Klemen »

Hi,

Could you send a sample problematic file to "pop3test" AT "hesk" DOT "com" so I can have a look?
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
depperdc
Posts: 7
Joined: Wed Oct 29, 2014 4:51 pm

Re: email2ticket not utf-8 characters

Post by depperdc »

Yes. Send
rox
Posts: 2
Joined: Thu Oct 30, 2014 5:51 pm

Re: email2ticket not utf-8 characters

Post by rox »

Same problem here. Please help us :)
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: email2ticket not utf-8 characters

Post by Klemen »

Please try this:

1. download this file

2. upload "posting_functions.inc.php" to your HESK "inc" folder (overwrite existing file)

3. test

Could you confirm this resolves the issue?

This change should remove any character from the name it doesn't detect and convert. It's not perfect (file name will change), but better than loosing the attachment.
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
depperdc
Posts: 7
Joined: Wed Oct 29, 2014 4:51 pm

Re: email2ticket not utf-8 characters

Post by depperdc »

Hello,
on a test copy of Hesk, everything works. When you copy the final system Hesk occurred mail processing cycle (cycle was creating tickets).
Please rewrite the procedure step by step.
Restart httpd not help me.
Excuse my English
Klemen
Site Admin
Posts: 10147
Joined: Fri Feb 11, 2005 4:04 pm

Re: email2ticket not utf-8 characters

Post by Klemen »

I am afraid I do not understand what you mean.

Try this:

1. enable HESK debug mode in settings (admin panel > Settings > Help Desk tab > Features > Debug mode: ON)

2. explain step-by-step what you are doing, what happens and what error messages you see
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
rox
Posts: 2
Joined: Thu Oct 30, 2014 5:51 pm

Re: email2ticket not utf-8 characters

Post by rox »

Dear Klemen,
Your solution worked for polish diacritics. Maybe it is not perfect, but now i see the attachment with an extension and can view it properly.

Thank You very much :)
depperdc
Posts: 7
Joined: Wed Oct 29, 2014 4:51 pm

Re: email2ticket not utf-8 characters

Post by depperdc »

Thanks, resolved..
add to original file line 162:

Code: Select all

   $filename = preg_replace('/[^\x20-\x7E]/','', $filename);
  	if ( strlen($filename) < 1 )
  	{
	   	$filename = mt_rand(10000,99999);
	  }
	return $filename;
My previous administrator here HESK regulate, so your fix did not work. this function it resolved.
Post Reply