Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

osTicket v1.10 (stable) and Maintenance Release v1.9.15 are now available! Go get it now

Apostrophe showing as black diamond question mark

Hi all,

While utilizing the email cron job, for the first time we had an email come in from someone with an apostrophe in their name... It fails to create a ticket and emails me a db error:
[INSERT INTO ost_ticket SET created=NOW() ,ticketID=306280,dept_id=4,topic_id='0',priority_id=2,email='',name='Diane O�Brien',subject='EDGEWOOD MANOR FDR not creating',helptopic='',phone="",phone_ext='',ip_address='',source='Email']

Incorrect string value: 'x92Brien' for column 'name' at row 1

I took a peak in class.mailfetch.php and the default for charset ($charset) is UTF-8 - which should cause this issue not to occur. However, there are various spots in the code where it seems it allows $charset to become a different encoding (ex. the mime_encode function).

When creating the ticket (function createTicket) it does access the mime_encode function when setting $var['name']... My only guess is that maybe the name is not in UTF-8 (and maybe mime_encode is where the problem lies)

Anyone have this issue? Or know how to resolve it?

Thanks in advance!

osticket 1.6 ST


  • I threw in a hack to resolve it for now...

    On function createTicket - I found the line:

    directly underneath it, I added:
    $var['name'] = str_replace(\"’\", \"'\",$var['name']);

    Not sure if I would call this a solution - but works in the interim
Sign In or Register to comment.