A
A
Anton Chernogolov2019-06-11 14:43:37
MySQL
Anton Chernogolov, 2019-06-11 14:43:37

MYSQL How to search JSON with Cyrillic type \uXXXX?

I'm trying to solve the problem with the filter on additional fields in OSTicket
Cyrillic is written to the database in the format " \u0422\u0421\u0416"
At the same time, the filter does not work. The database query looks like this:

SELECT ticket.ticket_id 
FROM ost_ticket ticket 
LEFT JOIN ost_ticket_status status ON (status.id = ticket.status_id) 
LEFT JOIN ost_ticket__cdata cdata ON (cdata.ticket_id = ticket.ticket_id) WHERE ( (ticket.staff_id=1 AND status.state="open" ) OR (ticket.team_id IN (1 ) 
AND status.state="open" ) OR ticket.dept_id IN (1,3) ) 
AND ((FIND_IN_SET('ТСЖ', `uk`)))

At the same time, if you replace the HOA with "\u0422\u0421\u0416" - it also does not find anything.
I did not find an answer to this question on the net.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
serginhold, 2019-06-11
@serginhold

I did not find an answer to this question on the net.

https://www.google.com/search?q=mysql+decode+utf8
https://stackoverflow.com/questions/11062330/mysql...
where STRINGDECODE(name) like '%HOA%'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question