Upgrade MySql to support emoji and utf8mb4
Some children's shoes do not have a deep understanding of Emoji expressions. They are reluctant to use Emoji and do not want to go to Baidu.Emoji is a character, not an image. If it is not supported by the client or database, upgrade it. the browser is also used. Since it is a character, can it be replaced manually? Yes.
WordPress upgraded to 4.2 after the version, increased the emoji expression. The expression uses the following CDN for remote loading:
http://s.w.org/images/core/emoji/72x72/
The problem is that the CDN is slow to visit at home, or even most of the time.
Know the reason, then the solution to the idea is there. The Volunteer studio provides two ideas to solve the problem, for reference only.
Option one:
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
Let MySQL support Emoji expressions. We recommend that you use the utf8mb4 character set in advance for MySQL databases involving wireless connections. What is the difference between utf8mb4 and utf8? Previous
Let MySQL support Emoji expressions. We recommend that you use the utf8mb4 character set in advance for MySQL databases involving wireless connections. What is the difference between utf8mb4 and utf8?
Enable MySQL 5.6 to support Emoji expressions
Let MySQL support Emoji expressions. We recommend that you use the utf8mb4 character set in advance for MySQL databases involving wireless connections.
MySQL 5.6
1 solution: Convert Mysql encoding from utf8 to utf8mb4.
Required> = MySQL 5.5.3 and slave database must also be 5.5. Earlier versions do not support this character set or duplicate error.
2 Add the my.
Tags: User Client SQ byte theory ase nbsp Problem collateMySQL added this UTF8MB4 code after version 5.5.3, Mb4 is the most bytes 4 meaning, specifically for compatibility with four-byte Unicode. In fact, UTF8MB4 is a superset of UTF8, theoretically using UTF8, and then modifying the character set to UTF8MB4, will not have any problems with the existing UTF8 encoded reads. Small program of the project, found to save the user information nickname times wrong, looking for reasons to find that some
Tags: mysql problem special character icon Lam value div with timingSince the landing was already very popular in the way of landing, the relevance should also be considered in database design. General storage open_id, icons, nicknames is enough. The nickname should be special attention, otherwise it might be like this: mysql:1366 incorrect string value bar bar ... This is because the nickname uses special characters, such as the Unicode emoji extensi
let MySQL support emoji emoticons, involving wireless-related MySQL database recommendations are in advance with the UTF8MB4 character set. MySQL version 5.61 solution: Convert the MySQL encoding from UTF8 to UTF8MB4.Requires >= MySQL 5.5.3 version, from the library must be 5.5, the lower version does not support this character set, copy error2 my.cnf File added [Mysqld]character-set-server = Utf8mb4collation-server = Utf8mb4_unicode_ciinit_connect= '
21,003 Chinese characters, GB2312 extension.
Utf-8:unicode standard variable length character encoding, Unicode Standard (Uniform code), industry uniform standards, including the world's dozens of kinds of text system;
UTF-8: Encode each character using one to three bytes.
Utf8mb4: Stores four bytes, and the application is used to store emoji emoticons because it can have emoji four bytes of
Scene: When doing development encounter emoji head; display is not normal;Limitations: This compilation is applied in the thinkphp framework;Emoji Library is mainly a replacement idea, because it corresponds to the Emoji of several mainstream devices ; so if it's all used emoji the original - The code may be in confli
Yesterday in the mobile interface development, developer feedback, to the interface to include the value of the mobile phone input method in the emoji expression, the app is directly hung off. Find the reason, found that when inserting data into the database, error incorrect string value: ' \xf0\x9f\x92\xaa ',... ' for column ' content ' at row 1.Now that you know the problem, go to the engine and search for the solution. Here are some things to know:
Tags: coded har var ODI url nic variables amp characterBackground:Because of the need to implement emoji expression comment function, so the database needs to support emoji expression storageMySQL UTF8 encodes a character up to 3 bytes, but a emoji expression is 4 bytes, so UTF8 does not support storing emoji emoticons
Tags: SRE vscode blank code targe target Font PAC modify fontWin10 Vscode By default can display color emoji, is really a son ah.However, the default is to display black and white under Linux.After some detours, the easiest way to find out is:1 Download Google Noto font complete 1.1G. Very slow had to buy a 1-month Thunderbolt member, offline download.Have not tried to download Noto color emoji fonts separa
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.