publiclab / plots2

a collaborative knowledge-exchange platform in Rails; we welcome first-time contributors! :balloon:
https://publiclab.org
GNU General Public License v3.0
961 stars 1.83k forks source link

Emoji in reply-by-email #2928

Open jywarren opened 6 years ago

jywarren commented 6 years ago

First, want to say that reply-by-email is AWESOME!!!!!!!

One small thing -- I tried sending a 🎉 in reply by email and got this error:


--000000000000cc5f67056f9393a7--

E, [2018-06-26T23:12:07.218298 #1] ERROR -- : Mysql2::Error: Incorrect string value: '\xF0\x9F\x8E\x89\x0A\x0A...' for column 'comment' at row 1: INSERT INTO `comments` (
`nid`, `uid`, `comment`, `timestamp`, `format`, `thread`, `comment_via`, `me
ssage_id`) VALUES (16574, 1, 'Testing response!\n  \n\nwith **formatting** &nbsp;<U+1F389>\n\n  \n\nOn Tue, Jun 26, 2018 at 5:01 PM \\<[do-not-reply@publiclab.org](mailto:do-not-reply@publiclab.org)\\> wrote:  \n\n> Public Lab contributor [warren](https://publiclab.org/profile/warren) just posted a new research note entitled \' **Are there lists of plants and the chemicals they can remediate?**\':\n> \n> Read and respond to the post here: [https://publiclab.org/notes/warren/06-26-2018/are-there-lists-of-plants-and-the-chemicals-they-can-remediate](https://publiclab.org/notes/warren/06-26-2018/are-there-lists-of-plants-and-the-chemicals-they-can-remediate)\n> \n> * * *\n> \n> I\'ve heard of compiled lists of plant species and the different things they can absorb from the air or soil or water. Does anyone know of such a list?\n> \n> * * *\n> \n> You received this email because you are subscribed to some or all of the following tags: .\n> \n> To change your preferences, please visit [https://publiclab.org/subscriptions](https://publiclab.org/subscriptions).\n> \n> Report spam and abuse to: [moderators@publiclab.org](mailto:moderators@publiclab.org)\n> \n> \r \r Check out the blog at [https://publiclab.org/blog](https://publiclab.org/blog) | Love our work? Become a Public Lab Sustaining Member today at [https://publiclab.org/donate](https://publiclab.org/donate)\n\n', 1530054727, 1, '01/', 1, 'CAGqfm_DFaA5h66ObwMsxFkgi5WwZHyByCniKbqpq1XfUAZj28A@mail.gmail.com')
/usr/local/bundle/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `_query'
/usr/local/bundle/gems/mysql2-0.3.21/lib/mysql2/client.rb:80:in `block in query'
/usr/local/bundle/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `handle_interrupt'
/usr/local/bundle/gems/mysql2-0.3.21/lib/mysql2/client.rb:79:in `query'
/usr/local/bundle/gems/activerecord-5.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:214:in `block (2 levels) in execute'
/usr/local/bundle/gems/activesupport-5.1.5/lib/active_support/dependencies/interlock.rb:46:in `block in permit_concurrent_loads'
/usr/local/bundle/gems/activesupport-5.1.5/lib/active_support/concurrency/share_lock.rb:185:in `yield_shares'
/usr/local/bundle/gems/activesupport-5.1.5/lib/active_support/dependencies/interlock.rb:45:in `permit_concurrent_loads'
/usr/local/bundle/gems/activerecord-5.1.5/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:213:in `block in execute'
/usr/local/bundle/gems/activerecord-5.1.5/lib/active_record/connection_adapters/abstract_adapter.rb:613:in `block (2 levels) in log'
/usr/local/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize'
namangupta01 commented 6 years ago

Same problem #2020

namangupta01 commented 6 years ago

@jywarren So for this we should go for changing encoding? #2020 #2665

jywarren commented 6 years ago

Want to try reproducing this issue in a test, then seeing if an encoding change resolves it?

On Tue, Jul 3, 2018 at 4:27 PM Naman Gupta notifications@github.com wrote:

@jywarren https://github.com/jywarren So for this we should go for changing encoding? #2020 https://github.com/publiclab/plots2/issues/2020

2665 https://github.com/publiclab/plots2/issues/2665

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/2928#issuecomment-402282499, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJytSXFGEiKMGhUCxJyYlMPFG3Z7gks5uC9OcgaJpZM4U40aQ .

namangupta01 commented 6 years ago

should i make a test for it?

jywarren commented 6 years ago

yeah, that sounds right. See if you can save a string with emoji in it (there are some in the tests already, i think?) and then try creating a node with it and see if it fails.

On Tue, Jul 3, 2018 at 5:42 PM Naman Gupta notifications@github.com wrote:

should i make a test for it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/2928#issuecomment-402300364, or mute the thread https://github.com/notifications/unsubscribe-auth/AABfJ3v0r5O-OdRkDV1WLP4uj_OzOscsks5uC-U8gaJpZM4U40aQ .

namangupta01 commented 6 years ago

okay 👍

On Wed, Jul 4, 2018 at 3:14 AM Jeffrey Warren notifications@github.com wrote:

yeah, that sounds right. See if you can save a string with emoji in it (there are some in the tests already, i think?) and then try creating a node with it and see if it fails.

On Tue, Jul 3, 2018 at 5:42 PM Naman Gupta notifications@github.com wrote:

should i make a test for it?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <https://github.com/publiclab/plots2/issues/2928#issuecomment-402300364 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AABfJ3v0r5O-OdRkDV1WLP4uj_OzOscsks5uC-U8gaJpZM4U40aQ

.

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/publiclab/plots2/issues/2928#issuecomment-402300831, or mute the thread https://github.com/notifications/unsubscribe-auth/ATwCYRsEkD6x3ZKpzX4Np0qMysAVs8jkks5uC-XDgaJpZM4U40aQ .

jywarren commented 3 years ago

I just tested this again since we finished upgrading the database for emoji unicode, by sending a reply to : https://publiclab.org/notes/warren/10-04-2018/reply-by-email-a-new-way-to-use-publiclab-org

Testing emojis in reply by email! 🎉🙌❤

It should process in a few minutes, let's see!