<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.appian.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/discussions/f/data/10690/saving-emoji-characters-to-appian-cloud-mysql-database</link><description>Hi, 
 We just encountered an error where a user entered an emoji into a form&amp;#39;s text description, which then failed to save in the MySQL database. Apparently this is due to the collation that is set on the database (utf8_general_ci) does not support such</description><dc:language>en-US</dc:language><generator>Telligent Community 12</generator><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/65045?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 14:12:56 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1b09ef72-37d4-4c71-87ca-06cdd7528a2e</guid><dc:creator>davel001150</dc:creator><description>If it is for some reason absolutely needed, perhaps you can save the numeric code value for the character in the database and a placeholder such as _ embedded in the text to serve as where the code goes, translating it back to the emoji again when you get it back from the database.&lt;br /&gt;
&lt;br /&gt;
Awful lot of work for a smiley, though.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/65043?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 14:01:42 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3ee71f40-b066-4c69-9482-9e95f6d41fe2</guid><dc:creator>Philip Snyman</dc:creator><description>&lt;p&gt;In our case it was actually in the name field returned by the Google Places API. It was somewhat unexpected to say the least.&lt;/p&gt;
&lt;p&gt;...and yes, the immediate fix was to strip out the &amp;quot;illegal&amp;quot; characters with the following expression:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;joinarray(
    char(
      reject(
        fn!exact,
        code(
          ri!place.name
        ),
        000000
      )
    )
)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Where 000000 is the unicode value of the offending character.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/65042?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 13:50:47 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9c7063d5-266c-4423-b449-27bc08ea177d</guid><dc:creator>davel001150</dc:creator><description>Another thing very much worth investigating is how those emoji got into the title in the first place.  It&amp;#39;s unlikely someone would intentionally go through all the trouble of adding one to legitimate business data, but very likely that an alternate program would automatically convert a string of characters into the emoji in question.&lt;br /&gt;
&lt;br /&gt;
I can&amp;#39;t mention the number of times I&amp;#39;ve tried typing a code snippet into Skype and it&amp;#39;s produced an Angry Face or Winking face when I actually wanted it to preserve the punctuation.  Just imagine what it might produce with Javascript like this: var total = x^3&amp;gt;(a);)  It&amp;#39;s a particular pain point with JIRA, that won&amp;#39;t let me punctuate the way I want without making things bold or red or whatever.  Just let me add punctuation without doing weird stuff unless I tell you.&lt;br /&gt;
&lt;br /&gt;
Faced with your situation, I&amp;#39;d want to know what program the user was using to create the string, and what key combination (such as ;)) that could produce the emoji.  Since that wasn&amp;#39;t the intent, you could use the code() function on incoming characters, and if you find one of the problem ones translate them into the original intended sequence of characters.&lt;br /&gt;
&lt;br /&gt;
Alternatively, there also might be a way to turn the auto-convert-to-emoji off on the other program.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/65041?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 13:27:43 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:62d73322-6605-4569-9524-b4ce42725418</guid><dc:creator>Josh</dc:creator><description>Depending on your strategy you could use stripwith or cleanwith&lt;br /&gt;
&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/19.1/fnc_text_stripwith.html"&gt;docs.appian.com/.../fnc_text_stripwith.html&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://docs.appian.com/suite/help/19.1/fnc_text_cleanwith.html"&gt;docs.appian.com/.../fnc_text_cleanwith.html&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/65037?ContentTypeID=1</link><pubDate>Wed, 06 Mar 2019 10:03:21 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:c8271bef-a7a5-4492-ac08-aa5b54050fb0</guid><dc:creator>Philip Snyman</dc:creator><description>Is there perhaps a suggested method to strip out the illegal characters, i.e. function or expression?&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46740?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 15:43:29 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:3bac592f-7601-4bcf-ba9e-7e61a47373e8</guid><dc:creator>Mike Cichy</dc:creator><description>Please make sure to open a Support case to report this.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46706?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 06:25:45 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:9928b2c2-727a-4637-8808-b62194296cad</guid><dc:creator>aloks0189</dc:creator><description>Yes I completely agree with you &lt;a href="/members/mikej117"&gt;mikej117&lt;/a&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46705?ContentTypeID=1</link><pubDate>Thu, 13 Jul 2017 06:22:09 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:753dd304-6c38-4b8d-bef4-8d7f4a03f0fa</guid><dc:creator>mikej117</dc:creator><description>Thanks for the replies  and &lt;a href="/members/joshl"&gt;Josh&lt;/a&gt; &lt;br /&gt;
&lt;br /&gt;
We are on Appian cloud so updating the database collation is not possible, unless Appian Support are willing to do so.&lt;br /&gt;
&lt;br /&gt;
It sounds like this is something that is better to be fixed at the product level (i.e. Appian) rather than each individual application.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46650?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 13:22:52 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:1db18298-4f99-467b-aca4-0d550cc184d0</guid><dc:creator>aloks0189</dc:creator><description>I agree with &lt;a href="/members/joshl"&gt;Josh&lt;/a&gt; unfortunately we need to alter the DB Schema as well, so i don&amp;#39;t feel writing emoji into DB, a good choice here, specially when we are on Cloud&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46646?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 12:00:06 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:7b282422-c2be-4419-9c91-e70d3ca5eaf2</guid><dc:creator>Josh</dc:creator><description>Another thing to note: emojis will break when trying to add news feed comments/posts. This might be fixed by applying the solution aloks176 suggested to the primary database, but I haven&amp;#39;t tried that. It may be more difficult to apply those updates to the primary database if you are on cloud.&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Saving Emoji characters to Appian Cloud MySQL database</title><link>https://community.appian.com/thread/46643?ContentTypeID=1</link><pubDate>Tue, 11 Jul 2017 06:49:17 GMT</pubDate><guid isPermaLink="false">d3a83456-d57b-489c-a84c-4e8267bb592a:2a9c7afe-d56b-438d-b0db-85a08a1105ac</guid><dc:creator>aloks0189</dc:creator><description>&lt;p&gt;hi&amp;nbsp;&lt;a href="/members/mikej117"&gt;mikej117&lt;/a&gt;&amp;nbsp;you can follow the following steps to allow MySQL Database Table to store emoji :&amp;nbsp;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt; 1) Set the database charset to utf8mb4&lt;br /&gt; &lt;br /&gt; 2) Set the charset of column to utf8mb4&lt;br /&gt; &lt;br /&gt; Below are the commands which you would like to execute&lt;br /&gt; ===============================================================================================================&lt;br /&gt; ALTER TABLE Tablename CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin&lt;br /&gt; &lt;br /&gt; ALTER TABLE `comments` CHANGE `text` `text` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Hope this will help You&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>