Non-Latin Characters Not Showing in Agent Screen

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Mon May 11, 2015 5:33 am

The names that are being inserted are Thai characters. I have non-latin characters set to 0 in the system config, I'm using the non-agent API to insert leads, in phpmyadmin the name appears correctly when listing the vicidial_list table. On the agent screen, however, the names are showing up as question marks. So far, I've tested in chrome, firefox, and IE with the same result, and tried adding a SET NAMES 'UTF8' query in vdc_db_query.php before the SELECT query for the lead data (line 1520) to no avail. Changing the page encoding in the browser does not seem to work either.

Any help would be greatly appreciated!
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am

Re: Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Mon May 11, 2015 5:41 am

I'd post a screenshot but seems offsite urls are being blocked by the forum since I'm new.
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am

Re: Non-Latin Characters Not Showing in Agent Screen

Postby mflorell » Mon May 11, 2015 11:54 am

vicidial.php version and build?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Mon May 11, 2015 1:16 pm

$version = '2.10-449c';
$build = '150212-0034';
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am

Re: Non-Latin Characters Not Showing in Agent Screen

Postby mflorell » Mon May 11, 2015 1:22 pm

We did fix some bugs related to allowing single-quotes in the agent interface in April, I would suggest upgrading to the most recent svn/trunk and see if the problem is still there.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Tue May 12, 2015 4:27 am

Hey, just wanted to update to say I fixed the problem.

There was no SET NAMES 'UTF8' query before grabbing the lead data (first_name) from the DB in the actions: manDiaLnextCaLL in vdc_db_query.php


This likely affects other actions as well if it hasn't been patched in the latest version
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am

Re: Non-Latin Characters Not Showing in Agent Screen

Postby mflorell » Tue May 12, 2015 5:52 am

Could you please post exactly what you changed?
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Tue May 12, 2015 7:59 am

##### grab the data from vicidial_list for the lead_id
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$rslt=mysql_to_mysqli($stmt, $link);

to

##### grab the data from vicidial_list for the lead_id
$stmt="SELECT lead_id,entry_date,modify_date,status,user,vendor_lead_code,source_id,list_id,gmt_offset_now,called_since_last_reset,phone_code,phone_number,title,first_name,middle_initial,last_name,address1,address2,address3,city,state,province,postal_code,country_code,gender,date_of_birth,alt_phone,email,security_phrase,comments,called_count,last_local_call_time,rank,owner,entry_list_id FROM vicidial_list where lead_id='$lead_id' LIMIT 1;";
$rslt=mysql_to_mysqli("SET NAMES 'UTF8'", $link);
$rslt=mysql_to_mysqli($stmt, $link);


Although you probably want to add some logic for the non-latin character config setting.

I added the SET NAMES query everywhere that dealt with the first_name column
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am

Re: Non-Latin Characters Not Showing in Agent Screen

Postby mflorell » Tue May 12, 2015 6:50 pm

I just added code to fix this in several places in the agent interface. If you get a chance, please upgrade to the latest svn/trunk version and let me know if my changes fix this on your system.
mflorell
Site Admin
 
Posts: 18387
Joined: Wed Jun 07, 2006 2:45 pm
Location: Florida

Re: Non-Latin Characters Not Showing in Agent Screen

Postby nickycakes » Thu May 14, 2015 7:53 am

I'm reluctant to upgrade my working installation without cause, since I've fixed the issue, but you could run a test by inserting a lead with a thai first name such as "ชญานุตน์" in a manual dial cmapaign and trying to pull it up on the agent screen.
nickycakes
 
Posts: 6
Joined: Mon May 11, 2015 5:26 am


Return to Support

Who is online

Users browsing this forum: Google [Bot] and 67 guests