With this query:
UPDATE `arg`.`arg_currency` SET `symbol` = '' WHERE `arg_currency`.`id` =2 LIMIT 1 ;
I get this error:
Warning: #1366 Incorrect string value:
‘\xF0\x90\x80\xA4’ for column ‘symbol’
at row 1
The column symbol was a CHAR(1) utf8_roman_ci, but I’ve both tried to change the collation to _general and to _unicode, and the chars to 4, but I’ve still got the same error.
What am I doing wrong?
(I’ve both tried to insert it via custom php code and via phpmyadmin)
As @CarpeNoctumDC points out, this question explains the problem:
MySQL don't want to store unicode character
In your case, I would work around it by storing the character as a numeric entity.
no, it doesn’t.htmlentities()with the UTF-8 encoding specified should be able to entity it, for example.This function in the User Contributed Notes of the PHP manual works for me: It converts the character into a numeric entity.