Comment box with emoji pop-up layer, semantic + emoji picker, java. SQL. SQLException: Incorrect string value: '\ xF0 \ x9F ..',
When you are doing a project on your own and making comments.
I selected the semantic. js prototype. This is not used in many countries, but the number of stars on github is very high. I want to find a js framework on it.
Semantic Chinese Network: http://www.semantic-ui.cn/
With his comments UI component: http://www.semantic-ui.cn/views/comment.html
As shown in
However, its comment box cannot use an emoticon, so I found an emoji selector on the Internet.
Github address: https://github.com/OneSignal/emoji-picker
Its effect is as follows:
Then the integration effect with semantic is as follows:
Next, if your database code is incorrect, an error will be reported.
Java. SQL. SQLException: Incorrect string value: '\ xF0 \ x9F \ x98 \ x9C \ xF0 \ x9F... 'for column 'content' at row 1at com. mysql. jdbc. SQLError. createSQLException (SQLError. java: 964 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com. mysql. jdbc. MysqlIO. checkErrorPacket (MysqlIO. java: 3973 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com. mysql. jdbc. MysqlIO. checkErrorPacket (MysqlIO. java: 3909 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com. mysql. jdbc. MysqlIO. sendCommand (MysqlIO. java: 2527 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com. mysql. jdbc. MysqlIO. sqlQueryDirect (MysqlIO. java: 2680 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.ConnectionImpl.exe cSQL (ConnectionImpl. java: 2487 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.PreparedStatement.exe cuteInternal (PreparedStatement. java: 1858 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.PreparedStatement.exe cuteUpdateInternal (PreparedStatement. java: 2079 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.PreparedStatement.exe cuteUpdateInternal (PreparedStatement. java: 2013 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.PreparedStatement.exe cuteLargeUpdate (PreparedStatement. java: 5104 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at com.mysql.jdbc.PreparedStatement.exe cuteUpdate (PreparedStatement. java: 1998 )~ [Mysql-connector-java-5.1.44.jar: 5.1.44] at sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method )~ [Na: 1.8.0 _ 151] at sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62 )~ [Na: 1.8.0 _ 151] at sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43 )~ [Na: 1.8.0 _ 151] at java. lang. reflect. Method. invoke (Method. java: 498 )~ [Na: 1.8.0 _ 151] at org. apache. tomcat. jdbc. pool. StatementFacade $ StatementProxy. invoke (StatementFacade. java: 114 )~ [Tomcat-jdbc-8.5.23.jar: na] at com.sun.proxy.w.proxy143.exe cuteUpdate (Unknown Source )~ [Na: na] at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.exe cuteUpdate (ResultSetReturnImpl. java: 205 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.exe cuteAndExtract (GetGeneratedKeysDelegate. java: 57 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. id. insert. AbstractReturningDelegate. parse minsert (AbstractReturningDelegate. java: 42 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. persister. entity. AbstractEntityPersister. insert (AbstractEntityPersister. java: 2909 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. persister. entity. AbstractEntityPersister. insert (AbstractEntityPersister. java: 3480 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org.hibernate.action.internal.EntityIdentityInsertAction.exe cute (EntityIdentityInsertAction. java: 81 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org.hibernate.engine.spi.ActionQueue.exe cute (ActionQueue. java: 623 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. engine. spi. ActionQueue. addResolvedEntityInsertAction (ActionQueue. java: 277 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. engine. spi. ActionQueue. addInsertAction (ActionQueue. java: 258 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. engine. spi. ActionQueue. addAction (ActionQueue. java: 303 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. AbstractSaveEventListener. addInsertAction (AbstractSaveEventListener. java: 318 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. AbstractSaveEventListener. abstrmsaveorreplicate (AbstractSaveEventListener. java: 275 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. AbstractSaveEventListener. abstrmsave (AbstractSaveEventListener. java: 182 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. AbstractSaveEventListener. saveWithGeneratedId (AbstractSaveEventListener. java: 113 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. jpa. event. internal. core. JpaPersistEventListener. saveWithGeneratedId (JpaPersistEventListener. java: 67 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. DefaultPersistEventListener. entityIsTransient (DefaultPersistEventListener. java: 189 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. DefaultPersistEventListener. onPersist (DefaultPersistEventListener. java: 132 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. event. internal. DefaultPersistEventListener. onPersist (DefaultPersistEventListener. java: 58 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. internal. SessionImpl. firePersist (SessionImpl. java: 773 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at org. hibernate. internal. SessionImpl. persist (SessionImpl. java: 758 )~ [Hibernate-core-5.2.8.Final.jar: 5.2.8.Final] at sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method )~ [Na: 1.8.0 _ 151] at sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62 )~ [Na: 1.8.0 _ 151] at sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43 )~ [Na: 1.8.0 _ 151] at java. lang. reflect. Method. invoke (Method. java: 498 )~ [Na: 1.8.0 _ 151] at org. springframework. orm. jpa. ExtendedEntityManagerCreator $ ExtendedEntityManagerInvocationHandler. invoke (ExtendedEntityManagerCreator. java: 347 )~ [Spring-orm-4.3.13.RELEASE.jar: 4.3.13.RELEASE] at com. sun. proxy. $ Proxy114.persist (Unknown Source )~ [Na: na] at sun. reflect. NativeMethodAccessorImpl. invoke0 (Native Method )~ [Na: 1.8.0 _ 151] at sun. reflect. NativeMethodAccessorImpl. invoke (NativeMethodAccessorImpl. java: 62 )~ [Na: 1.8.0 _ 151] at sun. reflect. DelegatingMethodAccessorImpl. invoke (DelegatingMethodAccessorImpl. java: 43 )~ [Na: 1.8.0 _ 151] at java. lang. reflect. Method. invoke (Method. java: 498 )~ [Na: 1.8.0 _ 151] to convert the encoding method of your database from UTF-8 to utf8mb4mysql, the encoding method is 5.5 +.
1. Modify the table field character set to utf8mb4
Alter table name modify column field name varchar (500) character set utf8mb4;
2. Modify the table Character Set utf8mb4
Alter table name charset = utf8mb4;
3. Modify the database character set utf8mb4
Alter database name character set utf8mb4;
After modification, remember to restart the mysql service.
How to restart the mysql service in windows:
1. My computer -- (right-click) Manage ==> services and applications ==> services ==> MYSQL ==> stop ==> enable
2. Win + R ==> net stop mysql ==> net start mysql
Then you can store your emotions with confidence.
OK.
Digress:
You can use the comments box component provided by other companies to provide more comprehensive functions.
Http://changyan.kuaizhan.com/static/help/
Youyan:
Http://www.uyan.cc/