MySQL Invalid UTF8 character string

Source: Internet
Author: User

Https://stackoverflow.com/questions/35125933/mysql-utf8mb4-errors-when-saving-emojis
Character_set_client, _connection, and _results must all is UTF8MB4 for the shortcake to be eatable.
If set NAMES utf8mb4 is executed, all three SET correctly.

A warning that occurs when writing a emoji character to a field in a text type in MySQL. In addition to setting the encoding for Table,column to UTF8MB4, remember to set the encoding for the database connection.

The specified encoding is normal when the program is connected. My MySQL Workbench client could not find a place to set the encoding (Manage Server connection-advanced-others added charset option doesn't seem to work) in MySQL The insert with emoji string in Workbench will report a warning, and the written emoji becomes a question mark, in which case execution is performed before the statement SET NAMES utf8mb4 is written or the query is normal.

MySQL Invalid UTF8 character string

Related Article

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.