mysql - Emoji inserts Play Framework -


i using play framework 2.0.x, having issue emoji inserts, seems sql class converting these mapped string values instead of correct character i'm trying insert. i'v tested things on mysql , works flawlessly utf8mb4 settings, happens when doing insert play , narrowed down whatever building query doing conversion before insert.

can see conversion happening in query within sql object

sql(                   """                       update users set                        first_name={fname}                       , last_name={lname}                       , email={email}                       , birthdate={bday}                       , gender={sex}                       user_id={userid}                    """                   ).on(                       'userid -> userid,                       'fname -> fname,                       'lname -> lname,                       'email -> email.trim,                       'bday ->bday,                       'sex -> gender                   ).executeupdate()  execution exception [[sqlexception: incorrect string value: '\xf0\x9f\x98\x9a' column 'first_name' @ row 1]] 

of course expecting see emoji icon @ point, 😜.

is there character encoding need change play? ideas appreciated!

thanks

adding 'set names utf8mb4' before query solved issue.


Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -