Today, I had a look at the tables where osticket saves values from the custom fields that we use in the forms.In table ost_form_entry_values, i have a lot of lines with value {"58":"\u0395\u03c1\u03ce\u03c4\u03b7\u03bc\u03b1"}.I checked table ost_list_items and id 58 is "Ερώτημα" (greek)Table and fields collision are utf8_general, OsTicket Version 1.10.1 with latest patches (1.10.2)RegardsGeorge

1.10.2 has not been released yet, I do not recommend running non-stable in production.Are you running the greek language pack?I'll ask @[deleted] to take a peek.

Good Morning ntozier, thanks for the reply.Yes i run the greek language pack. 

@[deleted]So you are using the Greek language pack, you have a List with one of the list items as "Ερώτημα", and you noticed that the values in the `ost_form_entry_values` table in the DB are encoded, correct? (just trying to get this straight)Cheers.

@[deleted]I am seeing the same thing but it doesn't affect anything (just how it's viewed in the DB). I'm pretty sure it's because it's not standard english characters (like A, B, C, etc.) and gets encoded for safety before saving to DB.Cheers.

Hi KevinTheJedi,The problem i have is that i need to run a query to get the number of tickets per field value, so when i run the query in phpmyadmin, i get the fields encoded.I will try to remove the encode and test again.

@[deleted]Well maybe you can decode them upon pulling them from the DB. Look at the below chunk of code that gets the form entry values and decodes them to UTF8 which is what the DB encoding is:```DELIMITER //CREATE FUNCTION STRINGDECODE(str TEXT CHARSET utf8)RETURNS text CHARSET utf8 DETERMINISTICBEGINdeclare pos int;declare escape char(6) charset utf8;declare unescape char(3) charset utf8;set pos = locate('\\u', str);while pos > 0 do    set escape = substring(str, pos, 6);    set unescape = char(conv(substring(escape,3),16,10) using ucs2);    set str = replace(str, escape, unescape);    set pos = locate('\\u', str, pos+1);end while;return str;END//DELIMITER ;SELECT STRINGDECODE(value) AS 'value' FROM `ost_form_entry_values`;```Instead of getting `{"16":"\u0395\u03c1\u03ce\u03c4\u03b7\u03bc\u03b1"}` I get `{"16":"Ερώτημα"}`.I hope this helps! Cheers.

Perfect!! Thanks again for the solution Kevin :)

5 days later

@[deleted]No problem!! I have to give credit where credit is due though, so, I thank the following SO thread for the SQL function:https://stackoverflow.com/questions/11062330/mysql-decode-unicode-to-utf-8-functionCheers.

Write a Reply...