First, the problem phenomenonSave user Nickname to database, iOS user's nickname contains emoticons, insert database error.Second, analysisUse JS filter emoji expression of the main reason: input tag entered emoji expression, submit the form after inserting database error.The reason is because the UTF-8 encoding is likely to be two, three, four bytes. The emoji e
Premise: MySQL database version can not be less than 5.5.The first method: Baidu a search a lot of, the main content is: Modify the MySQL configuration file (need to restart the database), modify the table and field encoding, are changed to UTF8MB4.The second method: Starting with JDBC, execute the Set names UTF8MB4 before each call to the database;Using the Druid Data source project, you can add Other data sources should also have similar configurations.The third method: re-encode the content t
Tags: mysqlObjective:The recently developed iOS project, because of the need for user text storage, naturally encountered an issue where emoticons such as emoji were supported by MySQL DB. Troubled for a few days, on the verge of desperate abandonment, finally completed the conversion and migration. In this special analysis and collation, convenient for more people. Problem Description:If the UTF8 character set is a Java server, when the store contain
How to make a emoji expression on a Mac? Apple's emoji expression is the first to be introduced and is undoubtedly the best of its kind. Another advantage of his is that there is no use of any tool software, is the system's own functions, support text editing and network applications, and can achieve fast input, see here I believe you will have a lot of interest. The following small compilation teaches ever
Tags: database brother LianProblem restoreWhen you use Erlang to store some special strings to MySQL , you can't read them. After checking, the binary format of these strings is as follows:What do you see in binary Unicode ? 14> unicode:characters_to_list ([128518,128528]15> erlang:integer_to_list (128518,16). Percent View Hex"1f606"16> erlang:integer_to_list (128528,16)."1f610"Obviously,1f606 and 1f610 exceed The expression range of the common Unicode string 0000-ffff . What do 1f606 and 1f
If the UTF8 character set is a Java server, when the store contains a emoji expression, it throws an exception similar to the following:Java.sql.SQLException:IncorrectStringValue' \xf0\x9f\x92\x94 'For column' Name ' at row1 at Com.mysql.jdbc.SQLError.createSQLException (Sqlerror.java:1073) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java:3593" at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java: 3525) at Com.mysql.jdbc.MysqlIO.se
Label:
Insert emoji expression in MySQL, error occurred:
Java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x98\x8a ' for column ' content ' at rowThe reason is that the current MySQL character set is Utf-8, up to 3 bytes, and the emoji expression takes 4 bytes to represent. So the insert error is caused.The general approach is to change the character set to UTF8MB42. Utf8mb4 such a char
Tags: http color ingest scene href character type data sdn1. First introduce the following commonly used character sets
ASCII: United States Information Interchange standard coding; English and other Western European languages; single-byte encoding, 7-bit represents a character, a total of 128 characters.
GBK: Double-byte, Chinese character code expansion specification; Chinese, Japanese and Korean characters, English, numerals, double-byte encoding, a total of 21,003 Chinese charac
MySQL does not show emoji expression or display?? , the reason is not explained here, directly to say the solution. (mainly modified UTF8MB4)1. Modify the table2. Modifying fieldsALTER TABLE ' table_name ' MODIFY COLUMN ' column_name ' varchar CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;3. CharSet when modifying client connectionsExample: In thinkphp, when you configure a link database parameter, ' db_charset ' = ' utf8mb4 'Do here, basically al
Why do you want to set the database charset to UTF8MB4? UTF8 used to be all the time? The answer is here: UTF8 for Internet interactions that do not use mobile devices, UTF8MB4 is suitable for the current mobile device Internet development, as mobile devices often have emoji (emoji) storage, which consumes 4 bytes of storage space, while UTF8 is 3 bytes, so that With 3 bytes to store 4 bytes of things, it i
http://my.oschina.net/jiemachina/blog/189460Note that the replacement of these emoji is the standard expression characters, each expression is originally 2 bytes, replaced by a string, each expression becomes 12 characters, wasted a lot of space, but simple, do not need to write a map one by one corresponding;Turn the expression into a stringdef Filter_emoji (desstr,restr= "):‘‘‘Filter Emoticons‘‘‘TryCO = re.compile (U ' [\u00010000-\u0010ffff] ')Exce
caused By:java.sql.SQLException:IncorrectstringValue'\xf0\x9f\x98\x84' forColumn' nickname'At row1At com.mysql.jdbc.SQLError.createSQLException (Sqlerror.java:1074) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java:4096) at Com.mysql.jdbc.MysqlIO.checkErrorPacket (Mysqlio.java:4028) at Com.mysql.jdbc.MysqlIO.sendCommand (Mysqlio.java:2490) at Com.mysql.jdbc.MysqlIO.sqlQueryDirect (Mysqlio.java:2651) at Com.mysql.jdbc.ConnectionImpl.execSQL (Connectionimpl.java:2734) at Com.mysql.jdbc.Pre
Tags: mysqld ble ini Beauty's name technology SRC user RACThe records of this blog are operated on LinuxThe project needs to log in from obtaining authorization, and in this process, there was an error saving the emoji emoticons to the MySQL database.The usual Baidu, learned that the UTF8 character set is MySQL only supports 1-3-byte characters, and the expression needs 4 bytes, so MySQL provides a utf8mb4 character set, in support of 4 bytes at the s
Now, windows10/windows8.1pc version of the WhatsApp communication applications ushered in the update, added voice call function, across the application sharing video, pictures and link functions, the application of the photo-sharing function, a one-time share of multiple photos and video features. Updated to v 0.2.2234 version. It is not only a Web page version of the WhatsApp package, but also support WINDOWS10 Notification Center, as well as file sending and camera calls. Note that this versio
' character set to UTF8MB4. Double-check this are actually happening–if you ' re running a older version of your chosen framework ' s MySQL client libra Ry, it may isn't have been compiled with UTF8MB4 support and it won ' t set the CharSet properly. If not, with may have to update it or compile it yourself. When viewing your data through to the MySQL client, make sure you ' re on a machine that can display emoji, and run a SET NAMES UTF8MB4 before r
PreparationsIt is your bad mobile phone, and then the mobile phone data line and computer, and then the perfect flash brush tool installed on the computer.Solution 1. Start the software and confirm to save the bricks. Double-click the software icon
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.