In daily life, the user sends the content that contains the emoji expression, untreated, in the display is garbled. So this article introduces several processing methods of emoji expression involved in PHP development. We hope to help you.
Background
When you do development, you will find that storing nicknames is essential.
But this evil support emoji expression do nickname, it is a bit of egg pain
The General MySQL table is designed with the UTF8 character set. The nickname field with emoji i
= Json[index];if (val.dic_id = = 16) {//Click the number of hits in the current article +1; if the number of clicks in the library is added successfully, then +1$ (". Like_unlike"). Append ("+val.content_id+ "," +val.click_count+ "," +val.id+ "," +val.dic_id+ "); \" Class=\ "like\" >+val.click_count+ ");}else if (val.dic_id = = 17) {$ (". Like_unlike"). Append ("+val.content_id+ "," +val.click_count+ "," +val.id+ "," +val.dic_id+ "); \" Class=\ "unlike\" >+val.click_count+ ");}});},Error:functi
Is the front-end output of a section such as/:8-) code,
Then in the front of the character to turn into the corresponding QQ expression, ask the great God know how to achieve it?
Reply content:
Is the front-end output of a section such as/:8-) code,Then in the front of the character to turn into the corresponding QQ expression, ask the great God know how to achieve it?
Since it is the code to the expression , then there will definitely be a code and e
be called when called, so we also rewrite these two setter methods in. m files,In order to change the text and font size of TextView in real time, it is also possible to rewrite their setter methodOf course, we customize the control and definitely implement its initialization method:In this case, the custom control method is finished.The third part of the test effectAfter the custom space of course need to test, read is not correct, in this method to modify placeholder and Placeholdercolor two
The expression encoding and decoding problem that was encountered while doing the barrageEmoticons are generally encoded using Unicode encoding, followed by the encoded format
\ud83d\ude18\ud83d\ude18world\u4e16\u754chaha\ud83d\ude17 //CodingNSString *unistr =[NSString Stringwithutf8string:[_barragetext.text utf8string]; NSData*unidata =[Unistr datausingencoding:nsnonlossyasciistringencoding]; NSString*goodstr =[[NSString alloc] Initwithdata:unidata encoding:nsutf8stringencoding]; NSLog (@
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, replication error stop MySQL Server serviceModify MY.CNF or Mysql.ini[Client]Default-character-set = Utf8mb4[MySQL]Default-character-set = Utf8mb4[Mysqld]Character-set-client-handshake = FALSECharacter-set-server = Utf8mb4Collation-server = Utf8mb4_unicode_ciinit_connect= ' SET NAMES utf8mb4 'Restart MySQL Server, check c
MySQL needs to support emoji emoticons version requires greater than 5.5.3, and the character set needs to be set to the UTF8MB4 character set.
What's the difference between utf8mb4 and UTF8? The original MySQL UTF8 a character up to 3 bytes, while UTF8MB4 expands to a character up to 4 bytes, so it can support more character sets.
Converts the MySQL encoding from UTF8 to UTF8MB4.
Need to >= MySQL 5.5.3 version, from the library must also be 5.5, t
Tags: mysqlSoft text link: http://blog.csdn.net/likendsl/article/details/7530979http://blog.csdn.net/luwei42768/article/details/48732611Show variables like ' character%View SettingsSet character_set_client = UTF8MB4;Set character_set_connection = UTF8MB4;Set character_set_database = UTF8MB4;Set character_set_results = UTF8MB4; Set character_set_server = UTF8MB4;Restart MySQLThis article is from the "Flail Blog" blog, please be sure to keep this source http://jhomephper.blog.51cto.com/8558055/176
Tags: style blog http color io using AR java forPhone end insert emoji expression, save to database times wrong:caused By:java.sql.SQLException:Incorrect string value: ' \xf0\x9f\x98\x84 ' forColumn ' Review ' at row 1At 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.sqlQu
] Character-set-server=utf8mb4 Step 2: In the connector/j connection parameter, do not add characterencoding parameters. When this parameter is not added, the default value is AutoDetect. jdbc.driver_class com.mysql.jdbc.Driver
jdbc.url jdbc\:mysql\://127.0.0.1\:3306/JLBMG? Useunicode\=true
#characterencoding\=UTF8
jdbc.username root
jdbc.password root Step 3: Convert the already built tables to UTF8MB4Command:ALTER TABLE ' table_name ' CONVERT to CHARACTER SET utf8mb4 COLLATE utf8mb4_gener
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
How do I bulk import and export emoticons tutorials in the PP helper:
After the computer installed the master of the PP expression management, the iOS device connected to the computer, select "Import expression" can be the local expression of a button import, drag and drop sync to the phone WeChat, support GIF, JPG, PNG, BMP, TIFF and many other expression image format, the operation is very simple.
WeChat collection of personalized expression can
When you are playing a beautiful shoot, you will find that the United States shot more than the expression plus voice or subtitles new features! That's right! This is the new play recommended by the United States photography, new emoji Oh! You can add emoji or voice to your photos, super new gameplay, this article will bring you a tutorial, let everyone easy to play.
Mei shot the latest feature of the expression text, this is in the picture above the new gameplay and not the United States s
]default-character-set=utf8mb4
Change the character set of the datebase,table,column (in fact I only use the next two, the datavase does not change and does not seem to affect):# foreachDatabase:ALTER DATABASEdatabase_nameCHARACTER SET =UTF8MB4 COLLATE=utf8mb4_unicode_ci;# foreachTable:ALTER TABLEtable_nameCONVERT to CHARACTER SETutf8mb4 COLLATE utf8mb4_unicode_ci;# foreachcolumn:ALTER TABLETABLE_NAME Change COLUMN_NAME column_nameVARCHAR(191)CHARACTER SETUTF8MB4 COLLATE utf8mb4_unicode_ci;
not be able to use UTF8MB4Finally, let the front-end application insert emoji expression, you can.Some small knowledge pointswhere Character-set-server and collation-server these settings for the UTF8MB4 character set is relatively easy to understand, that is, the MySQL database related to the character sets are set to UTF8MB4;However, in order to implement the client UTF8 connection to MySQL, the use of the UTF8MB4 character set, the Mysqld configuration is configured in the init_connect= ' se
CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;For each of the tables:
ALTER table here is the table name CONVERT to CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
3. Modify the MySQL configuration file
Go to this directory, under this directory there is a suffix .cnf filecd/usr/local/mysql/support-files/
Copy this file to the etc directory and name my.cnf itsudo cp my-default.cnf/etc/my.cnf
Then edit the my.cnf file and copy the contents below.
[Client]Def
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.