Non-Latin Characters Not Showing in Agent Screen
Posted:
Mon May 11, 2015 5:33 am
by nickycakes
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!
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Mon May 11, 2015 5:41 am
by nickycakes
I'd post a screenshot but seems offsite urls are being blocked by the forum since I'm new.
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Mon May 11, 2015 11:54 am
by mflorell
vicidial.php version and build?
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Mon May 11, 2015 1:16 pm
by nickycakes
$version = '2.10-449c';
$build = '150212-0034';
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Mon May 11, 2015 1:22 pm
by mflorell
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.
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Tue May 12, 2015 4:27 am
by nickycakes
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
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Tue May 12, 2015 5:52 am
by mflorell
Could you please post exactly what you changed?
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Tue May 12, 2015 7:59 am
by nickycakes
##### 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
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Tue May 12, 2015 6:50 pm
by mflorell
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.
Re: Non-Latin Characters Not Showing in Agent Screen
Posted:
Thu May 14, 2015 7:53 am
by nickycakes
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.