<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Question2Answer Q&amp;A - Recent questions tagged emojis</title>
<link>https://www.question2answer.org/qa/tag/emojis</link>
<description>Powered by Question2Answer</description>
<item>
<title>COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4'</title>
<link>https://www.question2answer.org/qa/105405/collation-utf8_bin-is-not-valid-for-character-set-utf8mb4</link>
<description>

&lt;p&gt;Hi, I already changed the collation but I still have this error:&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;[22-Dec-2022 18:36:15 UTC] PHP Question2Answer MySQL query error 1253: COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4' - Query: SELECT qa_posts.postid, qa_posts.categoryid, qa_posts.type, LEFT(qa_posts.type, 1) AS `basetype`, INSTR(qa_posts.type, '_HIDDEN')&amp;gt;0 AS `hidden`, INSTR(qa_posts.type, '_QUEUED')&amp;gt;0 AS `queued`, qa_posts.acount, qa_posts.selchildid, qa_posts.closedbyid, qa_posts.upvotes, qa_posts.downvotes, qa_posts.netvotes, qa_posts.views, qa_posts.hotness, qa_posts.flagcount, qa_posts.title, qa_posts.tags, UNIX_TIMESTAMP(qa_posts.created) AS `created`, qa_posts.name, qa_categories.title AS `categoryname`, qa_categories.backpath AS `categorybackpath`, CONCAT_WS(',', qa_posts.catidpath1, qa_posts.catidpath2, qa_posts.catidpath3, qa_posts.categoryid) AS `categoryids`, qa_uservotes.vote AS `uservote`, qa_uservotes.flag AS `userflag`, qa_userfavorites.entityid&amp;lt;=&amp;gt;qa_posts.postid AS `userfavoriteq`, qa_posts.userid, qa_posts.cookieid, qa_posts.createip AS `createip`, qa_userpoints.points, qa_users.flags, qa_users.level, qa_users.email AS `email`, qa_users.handle AS `handle`, BINARY qa_users.avatarblobid AS `avatarblobid`, qa_users.avatarwidth, qa_users.avatarheight FROM qa_posts LEFT JOIN qa_categories ON qa_categories.categoryid=qa_posts.categoryid LEFT JOIN qa_uservotes ON qa_posts.postid=qa_uservotes.postid AND qa_uservotes.userid='1' LEFT JOIN qa_userfavorites ON qa_posts.postid=qa_userfavorites.entityid AND qa_userfavorites.userid='1' AND qa_userfavorites.entitytype='Q' LEFT JOIN qa_users ON qa_posts.userid=qa_users.userid LEFT JOIN qa_userpoints ON qa_posts.userid=qa_userpoints.userid JOIN (SELECT postid FROM qa_posttags WHERE wordid=(SELECT wordid FROM qa_words WHERE word='صادرة' AND word='صادرة' COLLATE utf8_bin LIMIT 1) ORDER BY postcreated DESC LIMIT 0,20) y ON qa_posts.postid=y.postid&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;ALTER TABLE `qa_words` CHANGE `word` `word` VARCHAR(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;
&lt;br&gt;ALTER TABLE `qa_users` CHANGE `handle` `handle` VARCHAR(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;
&lt;br&gt;ALTER TABLE `qa_messages` CHANGE `content` `content` VARCHAR(12000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL;&lt;/p&gt;

&lt;p&gt;This happen only when I click on a tag&lt;/p&gt;

&lt;p&gt;What I'm missing?
&lt;br&gt;&amp;nbsp;&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/105405/collation-utf8_bin-is-not-valid-for-character-set-utf8mb4</guid>
<pubDate>Thu, 22 Dec 2022 18:44:35 +0000</pubDate>
</item>
<item>
<title>Issues when switching db_connect from UTF8 to UTF8mb4</title>
<link>https://www.question2answer.org/qa/91921/issues-when-switching-db_connect-from-utf8-to-utf8mb4</link>
<description>

&lt;p&gt;To allow emojis and other characters that come with ut8mb4 in q2a, there are some hints what code has to be changed:&lt;/p&gt;

&lt;p&gt;-&amp;nbsp;&lt;a href=&quot;https://www.question2answer.org/qa/28769/why-isnt-emoji-supported-in-q2a&quot; rel=&quot;nofollow&quot;&gt;https://www.question2answer.org/qa/28769/why-isnt-emoji-supported-in-q2a&lt;/a&gt;
&lt;br&gt;-&amp;nbsp;&lt;a href=&quot;https://www.question2answer.org/qa/54525/is-there-a-way-to-get-unicode-smiley-work-with-q2a&quot; rel=&quot;nofollow&quot;&gt;https://www.question2answer.org/qa/54525/is-there-a-way-to-get-unicode-smiley-work-with-q2a&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, when changing the DB connection in qa-db.php from &quot;utf8&quot; to &quot;utf8mb4&quot; q2a runs into this error:&lt;/p&gt;

&lt;blockquote&gt;

&lt;p&gt;PHP Question2Answer MySQL query error 1253: &lt;span style=&quot;color:#e74c3c&quot;&gt;COLLATION 'utf8_bin' is not valid for CHARACTER SET 'utf8mb4' &lt;/span&gt;- Query: SELECT example.postid, example.categoryid, example.type, LEFT(example.type, 1) AS basetype, INSTR(example.type, '_HIDDEN')&amp;gt;0 AS hidden, INSTR(example.type, '_QUEUED')&amp;gt;0 AS queued, example.acount, example.selchildid, example.closedbyid, example.upvotes, example.downvotes, example.netvotes, example.views, example.hotness, example.flagcount, example.title, example.tags, UNIX_TIMESTAMP(example.created) AS created, example.name, example.userid, example.cookieid, example.createip AS createip, example_userpoints.points, qa_users.flags, qa_users.level, qa_users.email AS email, qa_users.handle AS handle, BINARY qa_users.avatarblobid AS avatarblobid, qa_users.avatarwidth, qa_users.avatarheight FROM example LEFT JOIN qa_users ON example.userid=qa_users.userid LEFT JOIN example_userpoints ON example.userid=example_userpoints.userid JOIN (SELECT postid FROM example_posttags WHERE wordid=(SELECT wordid FROM example_words WHERE word='cracken' AND word='cracken' COLLATE utf8_bin LIMIT 1) ORDER BY postcreated DESC LIMIT 0,20) y ON example.postid=y.postid&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&quot;COLLATE utf8_bin&quot; is used one time in db/install.php and two times db/selects.php.&lt;/p&gt;

&lt;p&gt;What would be a smart way to overcome this problem?&lt;/p&gt;</description>
<category>Q2A Core</category>
<guid isPermaLink="true">https://www.question2answer.org/qa/91921/issues-when-switching-db_connect-from-utf8-to-utf8mb4</guid>
<pubDate>Wed, 24 Mar 2021 04:50:11 +0000</pubDate>
</item>
</channel>
</rss>