-1

How to save a text in another language with emoticons into sql database and use it to display on angularJS?

Backend language used is php and frontend is AngularJS. Database mySQL

sumit kotal
  • 35
  • 1
  • 7
  • have a column with nvarchar datatype and save all the unicode data into that column –  Jan 25 '18 at 20:10
  • This is a very open-ended question. Do you have any backend language or service in mind? – Will Jan 25 '18 at 20:11
  • This might help you: https://stackoverflow.com/a/39465494/6201829 – daBigBug Jan 25 '18 at 20:11
  • All that has been posted is a program description. However, we need you to [ask a question](//stackoverflow.com/help/how-to-ask). We can't be sure what you want from us. Please [edit] your post to include a valid question that we can answer. Reminder: make sure you know [what is on-topic here](//stackoverflow.com/help/on-topic), as asking us to write the program for you and suggestions are off-topic. – Blue Jan 25 '18 at 20:12

1 Answers1

0

You must use CHARACTER SET utf8mb4 directly (or indirectly) on all column definitions that expect to have Emoji.

You must connect with utf8mb4 or execute SET NAMES utf8mb4 after connecting.

If you get question marks, Mojibake, etc instead of Emoji, this Q&A may tell you what you failed to do.

Rick James
  • 135,179
  • 13
  • 127
  • 222